DETAILS
<%@ Page Language="VB" %>
<script runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim mailMessage As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage
mailMessage.From = "you@YourHostedDomainName.com"
mailMessage.To = "someone@somewhere.com"
mailMessage.Subject = "This is a sample mail sent from ASP.net Mail Component"
mailMessage.BodyFormat = System.Web.Mail.MailFormat.Text
mailMessage.body = "Congratulation" & VbCrLf & "If you receive this is, your mail component works"
System.Web.Mail.SmtpMail.SmtpServer = "localhost"
System.Web.Mail.SmtpMail.Send(mailMessage)
lblMessage.text = "Mail Sent"
End Sub
</script>
<html>
<body>
<form runat="server">
<asp:Label id="lblMessage" runat="server"></asp:Label>
</form>
</body>
</html>
