Interface IEmailService
Defines the contract for sending email messages.
Namespace: DataWeb.Email
Assembly: DataWeb.Core.dll
Syntax
public interface IEmailService
Properties
Name
Gets the display name of this email service provider.
Declaration
string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
SendAsync(EmailMessage, CancellationToken)
Sends an email message asynchronously.
Declaration
Task SendAsync(EmailMessage message, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| EmailMessage | message | The email message to send. Cannot be null. |
| CancellationToken | cancellationToken | A token to cancel the asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when |
| ArgumentException | Thrown when required message fields are missing or invalid. |