try to use this method
public Boolean SendingMail(string From, string To, string Subject,string Body)
{
try
{
MailMessage m = new MailMessage("Uma Shankar<test1@gmail.com>", To);
m.Subject = Subject;
m.Body = Body;
m.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "mail.google.com";
NetworkCredential authinfo = new NetworkCredential("test@gmail.com", "123456.com");
smtp.UseDefaultCredentials = false;
smtp.Credentials = authinfo;
smtp.Send(m);
return true;
}
catch (Exception ex)
{
return false;
}
}