Table of Contents

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

ProviderCapabilities

Name

The display name of the provider (for example, "SMTP" or "Resend").

string Name { get; }

Property Value

string

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

message EmailMessage

The message to send.

cancellationToken CancellationToken

A token used to cancel the operation.

Returns

Task<ProviderDeliveryResult>

A provider-specific delivery result.