ImapClient with self-signed certificate

Dear GemBox team,

is it possible to use the ImapClient with a self-signed certificate?

We get the German error message
Das Remotezertifikat ist laut Validierungsverfahren ungültig.
(The remote certificate is invalid according to the validation procedure.)

Should I set acceptAnyCertificate to true in the ImapClient constructor?

The constructor
ImapClient(string host, ConnectionSecurity security, bool acceptAnyCertificate);
does not allow to specify a port. Can I set the port and the acceptAnyCertificate parameter at the same time?

Thanks and best regards,
Thomas

Hi Thomas,

Please use the following constructor: ImapClient Class | GemBox.Email.Imap

Please read the documentation and examples of the RemoteCertificateValidationCallback Delegate (System.Net.Security) | Microsoft Learn to understand how to specify the RemoteCertificateValidationCallback parameter.

Regards,
Stipo

Thanks, Stipo!
Best, Thomas