Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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.
Whenever, wherever, whatever
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...