MailMessageDomainKeysVerify Method |
Namespace: MailBee.Mime
Exception | Condition |
---|---|
MailBeeException | An error occurred and ThrowExceptions is true. |
If the message contains only one signature (e.g. only DomainKeys or only DKIM), this method will still succeed (provided that this signature is valid).
If you need more advanced level of DomainKeys/DKIM verification, use DomainKeys class.
![]() |
---|
If the current system is FIPS-compliant and runs .NET 2.0/3.5 and the message contains only DKIM signature created using SHA256 algorithm, the method will return Sha256NotSupported or throw an exception if ThrowExceptions is enabled. This can only occur with older .NET versions (before 4.0) because there was no FIPS-certified SHA256 implementation at that time. On a FIPS system, use MailBee.NET.45.dll and .NET 4.5+ to avoid these issues. See FipsMode and DomainKeysVerifyResult topics for details. |
using System; using MailBee; using MailBee.Mime; using MailBee.Security; using MailBee.Pop3Mail; class Sample { static void Main(string[] args) { // Download the last e-mail in inbox. MailMessage msg = Pop3.QuickDownloadMessage( "mail.company.com", "alex@company.com", "secret", -1); // Display the result of DomainKeys/DKIM verification. Console.WriteLine(msg.DomainKeysVerify().ToString()); } }