Ok, I have been using the following script for over a year now to send email (via gmail) from my host, and it has worked just fine (the Settings.Get() just return strings):
public class Email : SmtpClient
{
public MailMessage Message { get; private set; }
public Email(string to, string from, string subject, string body) : base(Settings.Get("smtp"), 25)
{
this.EnableSsl = Convert.ToBoolean(Settings.Get("ssl"));
if(this.EnableSsl)
this.Credentials = new System.Net.NetworkCredential(Settings.Get("gm"), Settings.Get("gmp"));
this.Message = new MailMessage(from, to, subject, body);
}
public void Send()
{
try { this.Send(Message); }
catch (Exception ex) { throw ex; }
}
}
But, since yesterday, I have been getting this error:
Error: Server does not support secure connections.
Now of course my host thinks it's not their fault, BUT I DIDN'T CHANGE ANYTHING. Also, it still works fine on my local and test machines. Any idea what might be causing this so I can tell them to fix it?
Thank you... this is driving me nuts!