I have an application that works for no more than 5 years without any problems. This morning I can no longer send emails using a specific Gmail account. The exception that I get is: Unable to read data from transport connection: net_io_connection closed. Using credentials for another account is working fine. The account credentials have not changed, and I can send emails from the account using the Gmail interface. I contacted Google and their answer was that the account looks fine, it should be your application ... my answer is, the application has not changed and the use of other credentials. My relevant code is below, any ideas?
try
{
SmtpClient smtpClient = new SmtpClient();
using (MailMessage message = new MailMessage())
{
message.From = new MailAddress(Program.EMAIL_SENDER_ADDRESS, "SENDER NAME");
message.To.Add(new MailAddress(Program.ERROR_RECIPIENT));
message.Subject = callingClass + " ERROR: " + subject;
message.IsBodyHtml = true;
message.Body = body;
smtpClient.Host = "smtp.gmail.com";
smtpClient.Port = 587;
smtpClient.EnableSsl = true;
smtpClient.Credentials = new System.Net.NetworkCredential(Program.EMAIL_SENDER_ADDRESS, Program.EMAIL_SENDER_PASSWORD);
smtpClient.Send(message);
smtpClient.ServicePoint.CloseConnectionGroup(smtpClient.ServicePoint.ConnectionName);
}
}
catch (Exception x)
{
}
. 30 Google . , ?!?!