Hello, wonder why MailMessage.CheckSignature is not X509Certificate2Collection and is array! Anyway, it seems to work for clear-signed email, but I’ve loaded a signed + encrypted email to see if both certificates are also saved and got exception on line: .CheckSignature()
CryptographicException: Invalid cryptographic message type.
The required certificates are all installed in My Store.
Since I just need to save the certificates (signing & encryption) of message and nothing else, should not use Decrypt as it will remove the encryption certificate (I guess), although using Decrypt before CheckSignature will cause no difference and still got the exception!
Sample project + sample eml to reproduce the issue:
WindowsApplication1.zip (29.8 KB)