Interface IEmailProvider
- Namespace
- MailForge.Interfaces
- Assembly
- MailForge.dll
A delivery channel that can transmit an EmailMessage to its recipients. Implementations wrap a concrete email service such as an SMTP server, an HTTP API (Resend, SendGrid), or a cloud SDK (Amazon SES).
public interface IEmailProvider
Properties
Capabilities
Describes the capabilities supported by this provider.
ProviderCapabilities Capabilities { get; }
Property Value
Name
The display name of the provider (for example, "SMTP" or "Resend").
string Name { get; }
Property Value
Methods
SendAsync(EmailMessage, CancellationToken)
Transmits a message. Implementations must throw EmailException on transport or service failures so the framework pipeline can apply retries.
Task<ProviderDeliveryResult> SendAsync(EmailMessage message, CancellationToken cancellationToken = default)
Parameters
messageEmailMessageThe message to send.
cancellationTokenCancellationTokenA token used to cancel the operation.
Returns
- Task<ProviderDeliveryResult>
A provider-specific delivery result.