Interface IEmailSender
- Namespace
- MailForge.Interfaces
- Assembly
- MailForge.dll
The high-level entry point used by application code to send emails. The default implementation orchestrates rendering, validation, the middleware pipeline, and the configured IEmailProvider.
public interface IEmailSender
Methods
SendAsync(EmailMessage, CancellationToken)
Sends an email defined inline.
Task<EmailDeliveryResult> SendAsync(EmailMessage email, CancellationToken cancellationToken = default)
Parameters
emailEmailMessageThe message definition.
cancellationTokenCancellationTokenA token used to cancel the operation.
Returns
- Task<EmailDeliveryResult>
The delivery outcome.
SendAsync<TModel>(Email<TModel>, CancellationToken)
Sends a strongly typed email.
Task<EmailDeliveryResult> SendAsync<TModel>(Email<TModel> email, CancellationToken cancellationToken = default)
Parameters
emailEmail<TModel>The typed email definition.
cancellationTokenCancellationTokenA token used to cancel the operation.
Returns
- Task<EmailDeliveryResult>
The delivery outcome.
Type Parameters
TModel