Replace your user name and password in the mail.Body
Replace your from and to mail addresses.
protected void Button1_Click(object sender, EventArgs e)
{
MailMessage mail = new ("from mail address", "to mail address");
SmtpClient client = new SmtpClient();
client.Port = 25;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.UseDefaultCredentials = false;
client.Host = "smtp.google.com";
client.Credentials = new System.Net.NetworkCredential("Your EmailID ","password");
mail.Subject = "this is a test email.";
mail.Body = "this is my test email body";
client.Send(mail);
}
Reference :
Send e-mail via SMTP using C#[
^]