Sending e-mail using SMTP

With this class object you can send Email using the SMTP protoclol. In general it works like this: Set the properties then call the send method. You can add multiple attachments to the email and it is possible to send HTML formatted mail

There are much more properties, methods and events available than the demo below will show you. Some of the available properties are: Importance, Priority, MSMailPriority, ExpiryDate, Sensitivity, MessageFlag and ReplyBy

Attachments are seperated by a ; You can make these attachments visible inside your HTML email by giving them a name. You can do that by putting a | in front of it and the name before that. sample: attachmentname|attachment.gif You can then show that file (image) in your HTML email with a tag like: <img src=”cid:attachmentname”> This way you can send email messages with embeded pictures without the need for the recipient to click on the download pictures warning.

Click here to download the complete source code, the compiled DLL and the demo.

Here is some sample code:

Leave a Reply

Playground of Edwin Vermeer