basicamente es esto:
<%@ Page Language="VB" Debug="true" %>
<% @Import Namespace="System.Web.Mail" %>
<script language="vb" runat="server">
Sub Send2Mail (sender as Object, e as EventArgs)
Dim objMail as New MailMessage()
objMail.To = "
[email protected]"
objMail.From = strEmail.Text
objMail.BodyFormat = MailFormat.Text
objMail.Priority = MailPriority.Normal
objMail.Subject = strSubject.Text
objMail.Body = "Name : " + strName.Text + vbNewLine + "Email : " + strEmail.text + vbnewLine + "Message : " + strYourMsg.text
SmtpMail.SmtpServer = "mail.smtp.gmail.com"
SmtpMail.Send(objMail)
strMessage.Visible = true
End Sub
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "hxxp://xxx.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="hxxp://xxx.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>How to send email</title>
</head>
<body>
<asp:panel id="strMessage" runat="server" Visible="False">
Thanks for your kind message ... </asp:panel>
<form id="Form1" runat="server">
<b>First Name:</b> <br/>
<asp:textbox id="strName" runat="server" />
<br><br>
<b>Email Address:</b><br/>
<asp:textbox id="strEmail" runat="server" />
<br><br>
<b>Subject:</b><br/>
<asp:textbox id="strSubject" runat="server" />
<br><br>
<b>Your Message</b><br/>
<asp:textbox id="strYourMsg" runat="server" Columns="45" Rows="10" TextMode="MultiLine" />
<br />
<asp:button runat="server" id="func" Text="Send Message"
OnClick="Send2Mail" />
</form>
</body>
</html>