B
Bur3001
Hello everybody,
I have a windows app with errors reporting feature. When a user of my
app finds a bug or so, he/she can send me an email reporting that
problem.
The problem started to show up four or five days ago, an exception
gets thrown stating that "The SMTP server requires a secure connection
or the client was not authenticated. The server response was: 5.5.1
Authentication Required".
Then I did some modifications on the code then I got the this
exception "The server response was: 5.7.0 Must issue a STARTTLS
command first"
And the situation got even worst, NOW the smtp.google.com server
doesn't respond.
And there's the code:-
System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage();
msg.To.Add("(e-mail address removed)");
msg.From = new
System.Net.Mail.MailAddress("(e-mail address removed)", "Error
reporting", System.Text.Encoding.UTF8);
msg.Subject = "Reporting a bug";
msg.SubjectEncoding = System.Text.Encoding.UTF8;
msg.Body = "Test message" +
msg.BodyEncoding = System.Text.Encoding.UTF8;
msg.IsBodyHtml = false;
msg.Priority = MailPriority.High;
//Add the Creddentials
SmtpClient client = new SmtpClient();
client.Credentials = new
System.Net.NetworkCredential("(e-mail address removed)", "MyPassword");
client.Port = 587;// I also tried ports 25 and
465
client.Host = "smtp.google.com";
client.EnableSsl = true;
//you can also call client.Send(msg)
client.SendAsync(msg);
thanks in advance.
I have a windows app with errors reporting feature. When a user of my
app finds a bug or so, he/she can send me an email reporting that
problem.
The problem started to show up four or five days ago, an exception
gets thrown stating that "The SMTP server requires a secure connection
or the client was not authenticated. The server response was: 5.5.1
Authentication Required".
Then I did some modifications on the code then I got the this
exception "The server response was: 5.7.0 Must issue a STARTTLS
command first"
And the situation got even worst, NOW the smtp.google.com server
doesn't respond.
And there's the code:-
System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage();
msg.To.Add("(e-mail address removed)");
msg.From = new
System.Net.Mail.MailAddress("(e-mail address removed)", "Error
reporting", System.Text.Encoding.UTF8);
msg.Subject = "Reporting a bug";
msg.SubjectEncoding = System.Text.Encoding.UTF8;
msg.Body = "Test message" +
msg.BodyEncoding = System.Text.Encoding.UTF8;
msg.IsBodyHtml = false;
msg.Priority = MailPriority.High;
//Add the Creddentials
SmtpClient client = new SmtpClient();
client.Credentials = new
System.Net.NetworkCredential("(e-mail address removed)", "MyPassword");
client.Port = 587;// I also tried ports 25 and
465
client.Host = "smtp.google.com";
client.EnableSsl = true;
//you can also call client.Send(msg)
client.SendAsync(msg);
thanks in advance.