Closed premiumpixel closed 12 years ago
Try adding this to your code (C#):
System.Net.ServicePointManager.ServerCertificateValidationCallback = (sender, cert, chain, err) => true;
Hi i'm facing the same issue; Did that work for you premiumpixel ? I tried adding it both in my code before creating the imap client and directly into the library's connect method and none of them solved the problem.
var sslStream = new System.Net.Security.SslStream(_Stream, false, (sender, cert, chain, err) => true);
did the trick.
I think this issue will happen on many small providers.
Should a "bool skipCertificateValidation" arg be added to the connect method ?
@piher: Thanks much. That solved it. And I totally agree with your suggestion.
Hey andy, I'm trying to use your library with a imap and pop server to get mail. I'm getting this exception "Authentication Exception was unhandled by user code: The remote certificate is invalid according to the validation procedure." What can I do to skip this validation procedure?
Thanks much for your work, Florian