Hi, I want to collect information from a couple of fields and when the user clicks the submit button, the entered information is sent to an email address.
Printable View
Hi, I want to collect information from a couple of fields and when the user clicks the submit button, the entered information is sent to an email address.
Generally, sending e-mails is straight forward with ASP.NET...
For example, on your apply button click event...
So you can build the mail body using whatever text boxes you have added to your web page, above just sends whatever is entered into txtBody text box.Code:Private Sub cmdApply_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSearch.Click
Dim NewMessage As New System.Web.Mail.MailMessage()
NewMessage.To = "[email protected]"
NewMessage.From = "[email protected]"
NewMessage.Subject = "New information submitted"
NewMessage.Body = txtBody.Text
System.Web.Mail.SmtpMail.Send(NewMessage)
End Sub