Dmarc VerifierVerify Async(Mime Message, IEnumerableDkim Signature Validation Result, Spf Check Result, Cancellation Token) Method
Asynchronously 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
The result of DMARC validation.
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public Task<DmarcValidationResult> VerifyAsync(
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
TaskDmarcValidationResultThe result of DMARC validation.
Remarks
Validates the message using DKIM results that were obtained separately, such as by calling VerifyAsync(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. |