Sending email via C# Mailkit / Mimekit but server certificate error comes in
问题 0 Code in Visual Studio 2015 1 I am using Mailkit latest version (1.18.1.1) for sending an email from my own email server. 2 The email server is having a self signed certificate, which is not TRUSTED. 3 I have added both of the following lines in my code, to ignore the SERVER CERTIFICATE error: client.ServerCertificateValidationCallback = (mysender, certificate, chain, sslPolicyErrors) => { return true; }; client.CheckCertificateRevocation = false; 4 But my program still crashes. 5 In email