Emailing form

J

John

Hi

I have a webform full of textboxes and a submit button. How can I send
information in the text boxes as email when user presses submit?

Thanks

Regards
 
D

David P. Donahue

Something like this is a basic way of doing it, as long as
"mySMTPServer" is a working SMTP server and allows anonymous relay:

Dim emailMessage As New Mail.MailMessage()
emailMessage.To = "myDestinationAddress"
emailMessage.From = "mySourceAddress"
emailMessage.Subject = "mySubject"
emailMessage.BodyFormat = Mail.MailFormat.Html
emailMessage.Body = "myMessageBody"
Mail.SmtpMail.SmtpServer = "mySMTPServer"
Mail.SmtpMail.Send(emailMessage)



Regards,
David P. Donahue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top