FluentEmail icon indicating copy to clipboard operation
FluentEmail copied to clipboard

[MailKitSender] Per client ServerCertificateValidationCallback

Open Whivel opened this issue 2 years ago • 4 comments

[FluentEmail.MailKit] I added a new option in SmtpClientOptions to give the opportunity to specify a ServerCertificateValidationCallback per client. If specified the callback is assigned to the MailKit SmtpClient and it will be used instead of the default one. In that way it is possible to avoid the use of the global variable "ServicePointManager.ServerCertificateValidationCallback"

Whivel avatar Aug 16 '22 14:08 Whivel

duplicate #333

Whivel avatar Aug 16 '22 15:08 Whivel

There are two possible dupes/similar implementations: #333 and #256. Are we going to keep this or has any additional abilities compared to other two? so we can review the most beneficial PR?

aravindk777 avatar Mar 23 '24 20:03 aravindk777

in #256 and in #333 they both forgot to add the same features to the SendAsync method. Both prs pass and use CheckCertificateRevocation which is not in this pr.

in #333 the callback method is not passed.

I think #256 and #333 cannot be merged because they are incomplete because they miss the same change in the async method and. #338 (this) could be merged but i think CheckCertificateRevocation should be added (in this or with another pr)

Whivel avatar Mar 24 '24 09:03 Whivel

in #256 and in #333 they both forgot to add the same features to the SendAsync method. Both prs pass and use CheckCertificateRevocation which is not in this pr.

in #333 the callback method is not passed.

I think #256 and #333 cannot be merged because they are incomplete because they miss the same change in the async method and. #338 (this) could be merged but i think CheckCertificateRevocation should be added (in this or with another pr)

So, @Whivel - do you want to add that CheckCertificateRevocation in to this PR and then we can review and merge? Or do you intend to do that as separate PR?

aravindk777 avatar Mar 24 '24 21:03 aravindk777