Dmarc VerifierVerify Async(Mime Message, Spf Check Result, Cancellation Token) Method
Asynchronously validate the message.
Definition
Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
The result of DMARC validation.
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public Task<DmarcValidationResult> VerifyAsync(
MimeMessage message,
SpfCheckResult? spfResult,
CancellationToken cancellationToken = default
)Parameters
- message MimeMessage
- The message to validate.
- spfResult SpfCheckResult
- The result of the SPF check of the MAIL FROM identity, if available.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskDmarcValidationResultThe result of DMARC validation.
Remarks
Validates the message, using the DkimVerifier to verify the DKIM signatures of the message. The signatures are only verified if a DMARC Policy Record applies to the message.
DNS failures do not throw exceptions; they are reported via the Status and Errors of the result.
Exceptions
| ArgumentNullException | message is . |
| OperationCanceledException | The operation was canceled via the cancellation token. |