Hi all
The above error arising while using email sending code my code is
string fromAddress = "mymail";
string fromPassword = "mypassword";
try
{
var smtp = new System.Net.Mail.SmtpClient();
{
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.EnableSsl = true;
smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
smtp.Credentials = new NetworkCredential(fromAddress, fromPassword);
smtp.Timeout = 20000;
}
// Passing values to smtp object
smtp.Send(fromAddress, toAddress, MailSubject, Body);
I googled many times but didnt get proper solution.Port 587 is enbled and firewall blocking also not there.