Real basic sample here.
VB Code:
Sub btnSend_Click(s as Object, e as EventArgs)
Dim newMail as New MailMessage
newMail.From = txtFrom.Text
newMail.To = txtTo.Text
newMail.Subject = txtSubject>text
newMail.BodyFormat = MailFormat.Html
newMail.Body = txtMessageContent.Text
SmtpMail.SmtpServer = "ServerNameHere"
SmtpMail.Send(newMail)
End Sub
Don't forget to put your
VB Code:
<%@ import Namespace="System.Web.Mail" %>
at the top of the page. That is assuming you are doing your code inline. If not, just do your import on the code behind page as you would for a windows form.