You're right; this is fairly standard. You need a few Protected variables and your email routine.
Protected MsgSubject As String
Protected MsgBody As String
Public Attachment As String
Public SendMethod As String
Public SMTPServer As String = Convert.ToString(Common.Globals.HostSettings("SMTPServer"))
Public SMTPAuthentication As String = Convert.ToString(Common.Globals.HostSettings("SMTPAuthentication"))
Public SMTPUsername As String = Convert.ToString(Common.Globals.HostSettings("SMTPUsername"))
Public SMTPPassword As String = Convert.ToString(Common.Globals.HostSettings("SMTPPassword"))
Private Sub SendEmail()
Dim MsgText As String = ""
MsgText += "<table width=625>"
MsgText += "<tr>"
MsgText += "<td>Email Body Text Goes Here...</td>"
MsgText += "</tr>"
MsgText += "</table>"
'Email Routines
Dim OpenEmailFormatting As String
OpenEmailFormatting = ""
OpenEmailFormatting += "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">"
OpenEmailFormatting += "<HTML><HEAD><TITLE></TITLE>"
OpenEmailFormatting += "<META http-equiv=Content-Type content=""text/html; charset=iso-8859-1"">"
OpenEmailFormatting += "</HEAD><BODY>"
Dim CloseEmailFormatting As String
CloseEmailFormatting = "</BODY></HTML>"
'TO
MsgSubject = "Email Subject Text Goes Here..."
MsgBody = OpenEmailFormatting & MsgText & CloseEmailFormatting
Services.Mail.Mail.SendMail(UserInfo.Email, UserInfo.Email, "", "", Services.Mail.MailPriority.Normal, MsgSubject, Services.Mail.MailFormat.Html, System.Text.Encoding.UTF8, MsgBody, "", SMTPServer, SMTPAuthentication, SMTPUsername, SMTPPassword)
End Sub
Be sure to pay attention to intellitype when you are inside the SendMail routine. You'll want to make sure all the options are set properly. There are a few overloads. Find the one that works best for you.