I've upgraded my project - aspnet core MVC & jQuerry from 13.0.0 to 13.2.0 and I'm getting an error when I try to send emails. Here is the error:
An error was encountered while sending an email. An error occurred while attempting to establish an SSL or TLS connection. The server's SSL certificate could not be validated for the following reasons: • The server certificate has the following errors: • The revocation function was unable to check revocation for the certificate. • The revocation function was unable to check revocation because the revocation server was offline. • An intermediate certificate has the following errors: • The revocation function was unable to check revocation for the certificate. • The revocation function was unable to check revocation because the revocation server was offline. • The root certificate has the following errors: • A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
2 Answer(s)
-
1
Hi @eftimevalerian,
You should configure the SSL certificate on your server based on the error.
We recommend installing the SSL certificate correctly. But if you want to find a quick solution without sacrificing security.
Open
MailKitSmtpBuilder.cs
https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Core/Net/Emailing/AbpZeroTemplateMailKitSmtpBuilder.csChange line 31 to
client.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true;
-
0
Thank you, it worked.