SMTP using a NetworkStream in VB?
Question: I'm trying to write a simple function to send a message using SMTP. I'm having a little bit of difficulty understanding how to read/write data over the network stream. Can somebody give me a quick 101 on how to send and receive information over the stream? For example, once I connect, I need to wait for the HELO from the recipient server, then I need to send my HELO and wait for response. Can someone give me some pointers on how to do this little dance?
Answer:
Visual Studio comes with a code snippet to send an email via SMTP. You can insert it by going to Edit > Intellisense > Insert Snippet. The relevant snippet is in Connectivity and Networking > Create an Email Message.
More Questions & Answers...