Imports System.Web.Mail
'Declare a MailMessage object
Dim objMailMessage As New MailMessage
'Set the message properties
objMailMessage.To = emailAddresses
objMailMessage.From = fromAddress
objMailMessage.Subject = subject
objMailMessage.BodyFormat = MailFormat.Html
objMailMessage.Body = body
'Set the SmtpMail properties and send the mail message
SmtpMail.SmtpServer = mailServer
SmtpMail.Send(objMailMessage)
'Clean up
objMailMessage = Nothing
Declare and set variables for emailAddresses, fromAddress, subject, body, and mailServer. Multiple email addresses can be specified and should be separated with a semicolon.
I hope this helps.
Thearon
|