Interface IEmailValidator
- Namespace
- MailForge.Interfaces
- Assembly
- MailForge.dll
Validates an EmailMessage before it is delivered. Validators are invoked by the framework pipeline; a failed validation prevents the message from being sent.
public interface IEmailValidator
Methods
ValidateAsync(EmailMessage, CancellationToken)
Validates a message and returns zero or more problems. An empty result means the message is valid.
Task<IReadOnlyList<ValidationProblem>> ValidateAsync(EmailMessage message, CancellationToken cancellationToken = default)
Parameters
messageEmailMessageThe message to validate.
cancellationTokenCancellationTokenA token used to cancel the operation.
Returns
- Task<IReadOnlyList<ValidationProblem>>
A list of validation problems (empty when valid).