| MailServiceDefaultServerCertificateValidationCallback Method |
The default server certificate validation callback used when connecting via SSL or TLS.
Namespace: MailKitAssembly: MailKit (in MailKit.dll) Version: 4.7.1
Syntax protected 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.
Remarks The 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