DmarcVerifierVerify(MimeMessage, IEnumerableDkimSignatureValidationResult, SpfCheckResult, CancellationToken) Method

Validate the message using the specified DKIM and SPF results.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public DmarcValidationResult Verify(
	MimeMessage message,
	IEnumerable<DkimSignatureValidationResult> dkimResults,
	SpfCheckResult? spfResult,
	CancellationToken cancellationToken = default
)

Parameters

message  MimeMessage
The message to validate.
dkimResults  IEnumerableDkimSignatureValidationResult
The results of verifying the DKIM signatures of the message.
spfResult  SpfCheckResult
The result of the SPF check of the MAIL FROM identity, if available.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

DmarcValidationResult
The result of DMARC validation.

Remarks

Validates the message using DKIM results that were obtained separately, such as by calling Verify(FormatOptions, MimeMessage, CancellationToken) or from an upstream MTA.

DNS failures do not throw exceptions; they are reported via the Status and Errors of the result.

Exceptions

ArgumentNullException

message is .

-or-

dkimResults is .

ArgumentException One or more of the dkimResults is .
OperationCanceledException The operation was canceled via the cancellation token.

See Also