E.V.I.C.T.  B.V.
Edwin Vermeer Information Communication Technology.
Google
 
Web SITESKINNER.COM



home / open source software / SMTP

Your browser does not support webstandards: please upgrade your browser before proceding.(klick here for more information about web standards)

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 at the right 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 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.

How you can use the EVICT_SMTP.dll

Public WithEvents SMTPMail As EVICT_SMTP.SMTP
Private Sub cmdSend_Click()
   Set SMTPMail = New EVICT_SMTP.SMTP
   SMTPMail.SMTPHost = "smtp.myprovider.com"
   SMTPMail.SMTPPort = 25
   SMTPMail.From = "me@hotmail.com"
   SMTPMail.FromDisplayName = "Edwin Vermeer"
   SMTPMail.Recipient = "you@hotmail.com"
   SMTPMail.RecipientDisplayName = "It's You"
   SMTPMail.CcRecipient = "other@hotmail.com"
   SMTPMail.CcDisplayName = "Someone else"
   SMTPMail.BccRecipient = secret@hotmail.com
   SMTPMail.ReplyToAddress = "bitbucket@hotmail.com"
   SMTPMail.AsHTML = Me.chkHTML
   SMTPMail.Attachment = "image|c:\windows\Greenstone.bmp"
   SMTPMail.Subject = "this is just a test"
   SMTPMail.Message = "<html><h1>Hello</h1><br/><img
                       src="cid:\image"></html>"
   On Error Resume Next
   SMTPMail.Send
   If Err.Number <> 0 Then MsgBox "Error:" & Err.Number & _
       vbCrLf & Err.Description, vbCritical, "Could not send mail"
   On Error GoTo 0
End Sub

 
Cool! Planet-source-code
Thums up! Get Firefox! Valid HTML 4.01! Valid CSS!