Table of Contents

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

email EmailMessage

The message definition.

cancellationToken CancellationToken

A 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

email Email<TModel>

The typed email definition.

cancellationToken CancellationToken

A token used to cancel the operation.

Returns

Task<EmailDeliveryResult>

The delivery outcome.

Type Parameters

TModel