I created console application for sending Email
public static void sendEmail(string email, string body)
{
if (String.IsNullOrEmpty(email))
In my experienced using C# SMTP Client, there is a certain steps to follow in the code (see code snippet below)
smtpClient.Host = "smtp.gmail.com";
smtpClient.Port = 587;
smtpClient.EnableSsl = true;
smtpClient.UseDefaultCredentials = false;
smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
smtpClient.Credentials = new NetworkCredential("account@gmail.com", "secretPassword");
smtpClient.Send(mail);