try
{
MailMessage mail = new MailMessage();
mail.To.Add("anzaman_edi@yahoo.com");
mail.To.Add("shi01715@yahoo.com");
mail.From = new MailAddress("shishir64092@gmail.com");
mail.Subject = "Send Email by asp.net code using google or gmail smtp server";
string Body = "Hi"+USERNAME+ ", I am testing Email function in asp.net" +
"using google or gmail smtp server";
mail.Body = Body;
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Credentials = new System.Net.NetworkCredential
("shishir64092@gmail.com", "abcdef");
smtp.EnableSsl = true;
smtp.Send(mail);
}
catch (Exception ex)
{
Label1.Text = ex.Message;
}
in your mail
body
you can set your params!