Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VB Question!

Options
  • 28-11-2002 2:18pm
    #1
    Closed Accounts Posts: 7,230 ✭✭✭


    hi, I'm working on a Library System project in college and I have come accross a problem.
    When all the books are out i want the person using the app to be asked to email the publisher requesting another copy of the book. The only thing is i have absolutely no idea how to send an email using vb. I don't want to launch outlook express, i want the full mail sent via the sendmail protocol (snmp or whatever it is).

    IMPORTANT: I am not asking for the FULL code here, just ideas on how to deal with this problem.

    Thanks for your help!!!


Comments

  • Registered Users Posts: 16,413 ✭✭✭✭Trojan


    Originally posted by sjones
    I don't want to launch outlook express, i want the full mail sent via the sendmail protocol (snmp or whatever it is).

    IMPORTANT: I am not asking for the FULL code here, just ideas on how to deal with this problem.

    Lets get protocols right - what you want is SMTP - Simple Mail Transfer Protocol.

    Break down the problem into smaller chunks - you need to create a socket to connect with your smtp server, then you need to talk smtp down it.

    Go find out how to make a socket 1st. Then send simple strings down it and read the response.

    What strings? Well now you need more info on SMTP. Go look that up.

    You need to do some experimentation, so make sure you have an smtp server that you can use somewhere.

    Post up more detailed problems you encounter as you hit them - just should be enough to get you started.

    Al.


  • Registered Users Posts: 2,494 ✭✭✭kayos


    Or you could always just use MAPI without starting up OE. Check out the Microsoft MAPI controls. They are easy enough to get to grips with.

    kayos


  • Registered Users Posts: 629 ✭✭✭str8_away


    if you are using ASP

    try this
    Set objMsg = Server.CreateObject("CDONTS.NewMail")

    I am sure you can figer out the rest


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    Originally posted by kayos
    Check out the Microsoft MAPI controls. They are easy enough to get to grips with.

    Agreed. While not a very "elegant" solution, the easiest way to handle this stuff is :

    1) Go to Project\Components...
    2) Search the list for "Microsoft MAPI Controls" and enable it as a component to use
    3) Check the components added to your toolbox, and go read up the help on how to use them.

    Its pretty simple from there.

    jc


  • Closed Accounts Posts: 7,230 ✭✭✭scojones


    That was excellent guys. Sorted me out nicely. Cheers :D


  • Advertisement
  • Registered Users Posts: 16,413 ✭✭✭✭Trojan


    Guess it's obvious I'm not a VB mupp^Wprogrammer! :)

    Al.


Advertisement