 | MailService.DefaultServerCertificateValidationCallback Method |
The default server certificate validation callback used when connecting via SSL or TLS.
Namespace: MailKitAssembly: MailKit (in MailKit.dll) Version: 4.10.0
Syntaxprotected static bool DefaultServerCertificateValidationCallback(
Object sender,
X509Certificate certificate,
X509Chain chain,
SslPolicyErrors sslPolicyErrors
)
Parameters
- sender Object
- The object that is connecting via SSL or TLS.
- certificate X509Certificate
- The server's SSL certificate.
- chain X509Chain
- The server's SSL certificate chain.
- sslPolicyErrors SslPolicyErrors
- The SSL policy errors.
Return Value
Booleantrue if the certificate is deemed valid; otherwise,
false.
RemarksThe default server certificate validation callback recognizes and accepts the certificates
for a list of commonly used mail servers such as gmail.com, outlook.com, mail.me.com, yahoo.com,
and gmx.net.
See Also