Dim objMail As New MailMessage()
On the next step we have to set all the properties of the objMail object:
' The email address of the sender
objMail.From = "yourname@yourdomain.com"
' The email address of the recipient
objMail.To = "recipientname@somedomain.com"
' The email address of the Cc recipient
objMail.Cc = "name1@anotherdomain.com"
' The email address of the Bcc recipient
objMail.Bcc = "name2@anotherdomain.com"
' The format of the message - it can be MailFormat.Text or MailFormat.Html
objMail.BodyFormat = MailFormat.Text
' The priority of the message - it can be MailPriority.High,
' MailPriority.Normal or MailPriority.Low
objMail.Priority = MailPriority.High
' The subject of the message
objMail.Subject = "My first ASP.NET email"
' The message text
objMail.Body = "This is my first email sent via ASP.NET. "
|