+1 vote

I get the following error message:

Unhandled Exception: System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
....
at Limilabs.Client.ClientBase.?(Stream ?)
at Limilabs.Client.ClientBase.?()
at Limilabs.Client.SMTP.Smtp.StartTLS()
at Limilabs.Client.SMTP.Smtp.UseBestLogin(String user, String password)

by

1 Answer

0 votes
 
Best answer

UseBestLogin method decided that connection must be secured (using SSL) in order to login. This happens if server responds with LOGINDISABLED in most cases.

The error means that either your server is using self-signed certificate or
you are using incorrect server name
(For example mail.example.com instead of smtp.example.com for which the certificate was issued)

You can accept self-signed certificates or ignore such errors by
subscribing to ServerCertificateValidate event:
https://www.limilabs.com/blog/the-remote-certificate-is-invalid-according-to-the-validation-procedure

by (301k points)
...