06Feb Sending Email from your blog
I wanted to be able to send email from my blog when visitors placed comments on an entry. To do this I used the following code:
Private Sub SendEmail()
'from: http://www.4guysfromrolla.com/webtech/080801-1.shtml
'Create an instance of the MailMessage class
Dim objMM As New System.web.Mail.MailMessage
'Set the properties
objMM.To = "email@domain.com"
objMM.From = "email@domain.com"
'Send the email in text format
objMM.BodyFormat = System.Web.Mail.MailFormat.Html
'(to send HTML format, change MailFormat.Text to MailFormat.Html)
'Set the priority - options are High, Low, and Normal
objMM.Priority = System.Web.Mail.MailPriority.Normal
'Set the subject
objMM.Subject = "New Comment Posted"
'Set the body - use VbCrLf to insert a carriage return
objMM.Body = "The following comment was posted to your blog:" & txtBody.Text
System.Web.Mail.SmtpMail.Send(objMM)
End Sub
Check out the 4guys link for more properties etc.

