Skip to main content
public static void SendMail(MailMessage Message) {   SmtpClient client = new SmtpClient();   client.Host = "smtp.googlemail.com";   client.Port = 587;   client.UseDefaultCredentials = false;   client.DeliveryMethod = SmtpDeliveryMethod.Network;   client.EnableSsl = true;   client.Credentials = new NetworkCredential("[email protected]", "password");   client.Send(Message); } 
public static void SendMail(MailMessage Message) {   SmtpClient client = new SmtpClient();   client.Host = "smtp.googlemail.com";   client.Port = 587;   client.UseDefaultCredentials = false;   client.DeliveryMethod = SmtpDeliveryMethod.Network;   client.EnableSsl = true;   client.Credentials = new NetworkCredential("[email protected]", "password");   client.Send(Message); } 
public static void SendMail(MailMessage Message) { SmtpClient client = new SmtpClient(); client.Host = "smtp.googlemail.com"; client.Port = 587; client.UseDefaultCredentials = false; client.DeliveryMethod = SmtpDeliveryMethod.Network; client.EnableSsl = true; client.Credentials = new NetworkCredential("[email protected]", "password"); client.Send(Message); } 
Source Link
Mnyikka
  • 1.3k
  • 18
  • 12

public static void SendMail(MailMessage Message) { SmtpClient client = new SmtpClient(); client.Host = "smtp.googlemail.com"; client.Port = 587; client.UseDefaultCredentials = false; client.DeliveryMethod = SmtpDeliveryMethod.Network; client.EnableSsl = true; client.Credentials = new NetworkCredential("[email protected]", "password"); client.Send(Message); }