asp.net - Error: Server does not support secure connections -


OK, I sent the following script for more than a year to send email (via Gmail) from my host Settings.Get () Just return the strings):

  Public class email: SmtpClient {public mail message message { Get; Private set; } Public Email (String, String, String Subject, String Body): Base (Settings. Get ("smtp"), 25) {this.EnableSsl = Convert.ToBoolean (Settings.Get ("ssl")); If (it's .sls. Enabled) it. Credentials = new system.net.netnetcode (settings.gate ("GM"), settings .gate ("GMP"); this. Message = new mailmax (from, subject, body); } Send Public Zero () {try {this.Send (message); } Hold (Exceptional) {East; }}}  

But, since yesterday, I am getting this error:

Error: The server does not support secure connections.

Now my host thinks that this is not his fault, but I have not changed anything. Apart from this, it still works fine on my local and testing machines.

Thank you ... this is driving me crazy!

SMTP-server and port What are you using? If you are connecting directly to smtp.gmail.com to send SSL mail, then you need to use port 465 or 587.

It seems that you are using port 25, are you sure your returns Settings.Get ("ssl") wrong?


Comments