DomainKeysVerify Method (MailMessage, Smtp, DomainKeysTypes)
Verifies the DomainKeys and/or DKIM signatures of the mail message.

Namespace: MailBee.Security
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public DomainKeysVerifyResult Verify(
	MailMessage msg,
	Smtp dnsRequestor,
	DomainKeysTypes dkTypes
)

Parameters

msg
Type: MailBee.MimeMailMessage
The mail message to be verified.
dnsRequestor
Type: MailBee.SmtpMailSmtp
The instance of Smtp class to be used for making DNS queries.
dkTypes
Type: MailBee.SecurityDomainKeysTypes
Specifies which signatures to verify (classic DK, newer DKIM, or both).

Return Value

Type: DomainKeysVerifyResult
The result of the verification.
Exceptions
ExceptionCondition
MailBeeInvalidArgumentExceptionmsg or dnsRequestor is a null reference (Nothing in Visual Basic) or dnsRequestor.DnsServers collection is empty or FipsMode is enabled and DKIM verification is requested.
MailBeeExceptionAn error occurred and ThrowExceptions is true.
Remarks
This overload of Verify(MailMessage, Smtp) allows you to select which methods to use (classic DK, newer DKIM, or both).
Note Note
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.dll for >NET 4.0+ to avoid these issues. All classic DK signatures and those DKIM signatures which use SHA1 algorithm are fully supported on all Windows platforms, including FIPS-compliant ones. You'll still need to enable FipsMode to use FIPS-compliant versions of security algorithms.
See Also