Mail To:

Won't this cause their default e-mail program to come up with my e-mail address showing in the address bar. I want it to automatically send the data in the form directly to my e-mail address, without any user intervention other than pressing the submit button.
 
Dim email As New System.Web.Mail.MailMessage()
email.To = "RecipientAddress"
email.From = "SenderAddress"
email.Body = "MessageText"
email.Subject = "SubjectText"
email.BodyFormat = Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "SmtpServerName"
System.Web.Mail.SmtpMail.Send(email)

Your web server has to have Smtp mail to do this and may require other properties to be set. I've never done it before, I just knew the namespace to look in for you.
 
Back
Top