0

Below is my code using smtp for sending mail.

MailMessage mm = new MailMessage("[email protected]", "[email protected]");
mm.Subject = "test";
mm.Body = "hi";
SmtpClient smtp = new SmtpClient("smtp.gmail.com",587);
smtp.Credentials = new NetworkCredential { UserName = "[email protected]", Password = "" };
smtp.EnableSsl = true;
smtp.Send(mm);

when am trying to execute this code i got the below error, smtp error

please help me to resolve this error..

Thanks in Advance,

Joest
  • 158
  • 6

1 Answers1

1

Try the following:

Joest
  • 158
  • 6