Firstly Install ansmptp.exe :
Source Code:
using AOSMTPLib;
AOSMTPLib.MailClass oSmtp = new AOSMTPLib.MailClass();
oSmtp.FromAddr = "sunichand2000@yahoo.co.in";
oSmtp.AddRecipient("Support Team", "sunichand2000@gmail.com", 0);
oSmtp.Subject = "Test";
oSmtp.BodyText = "Hello, this is a test....";
if (oSmtp.SendMail() == 0)
{
Response.Write("Message delivered!");
}
else
{
Response.Write(oSmtp.GetLastErrDescription());
}