This article applies to Windows hosting accounts only.
Example
 Listed below is a simple example showing how to send email using ASP.NET: -
 <% @Page Language="C#" %>
 <% @Import Namespace="System.Web.Mail" %>
 <%
 string strTo = "name@somedomain.co.uk";
 string strFrom = "yourname@yourdomain.co.uk";
 string strSubject = "Test message";
 SmtpMail.SmtpServer = "localhost";
 SmtpMail.Send(strFrom, strTo, strSubject,"Hello, this is a test message.");
 Response.Write("Email successfully sent");
 %>
