try this code
string subject = "mention subject here";
try
{
string emailTo = "email";
string emailfrom="email";
string body = "urbody";
MailMessage objmail = new MailMessage(emailfrom, emailTo, subject,body);
SmtpClient smtpclnt = new SmtpClient("smtp.gmail.com", 587);
smtpclnt.DeliveryMethod = SmtpDeliveryMethod.Network;
smtpclnt.UseDefaultCredentials = true;
smtpclnt.EnableSsl = true;
smtpclnt.Credentials = new System.Net.NetworkCredential("username", "password");
smtpclnt.Send(objmail);
}
catch (Exception ex)
{
}