using System.Net;
using System.Net.Mail;
public string ord, body;
MailMessage oMail = new MailMessage();
SmtpClient oSmtp = new SmtpClient("smtp.gmail.com", 587);
try
{
oMail.To.Add(b@b.com);
oMail.From = new MailAddress("a@a.com");
oMail.Subject = "Subject";
body = "Hello, <br />";
body += "How are you";
oMail.Body = body;
oMail.IsBodyHtml = true;
oSmtp.UseDefaultCredentials = false;
oSmtp.Credentials = new System.Net.NetworkCredential("a@a.com", "password");
oSmtp.EnableSsl = true;
oSmtp.Send(oMail);
}
catch { }