Below is my code using smtp for sending mail.
MailMessage mm = new MailMessage("user@gmail.com", "user@gmail.com");
mm.Subject = "test";
mm.Body = "hi";
SmtpClient smtp = new SmtpClient("smtp.gmail.com",587);
smtp.Credentials = new NetworkCredential { UserName = "user@gmail.com", Password = "" };
smtp.EnableSsl = true;
smtp.Send(mm);
when am trying to execute this code i got the below error,
please help me to resolve this error..
Thanks in Advance,