1: Dim mail As New System.Web.Mail.MailMessage
2: mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", "SERVER")
3: mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", 465)
4: mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", True)
5: mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "USERNAME")
6: mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "PASSWORD")
7: mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", 2)
8: mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1)
9: ...
10: ...
11: Web.Mail.SmtpMail.Send(mail)