This is Part 1 of ‘Sending Email with Advanced Features’ which will show how you can send an email message and add not just one attachment, but pretty much as many attachments as you want. If you haven’t already, I recommend you check out this article I made on the basics of setting up and sending email using the System.NET.Mail SMTP feature in the DotNET Framework. The code I’m using is compatible with Visual Basic .NET 2005, VB 2008, and VB.NET 2010 since I’m using the classes under the System.NET.Mail namespace which is made available in the .NET 2.0, .NET 3.0, .NET 3.5, and the .NET 4.0 Frameworks. I am using SMTP and a Google GMail account to send the email message.
First of all to get started you will want a instance of a few classes. Below are the ones you’ll need to setup…
Below are the variables I am using for the classes above..