Interface ISmtpSender
- Namespace
- Dynamicweb.Mailing
- Assembly
- Dynamicweb.Core.dll
Defines the contract for email sending services, providing a unified interface for SMTP email delivery implementations.
public interface ISmtpSender
Properties
Options
Get Configuration options for SMTP connection and authentication
SmtpOptions Options { get; }
Property Value
Methods
SendAsync(EmailMessage, CancellationToken)
Sends an email message asynchronously with cancellation support.
Task SendAsync(EmailMessage message, CancellationToken cancellationToken)
Parameters
messageEmailMessageThe email message to send
cancellationTokenCancellationTokenToken to monitor for cancellation requests
Returns
- Task
A task that represents the asynchronous send operation
WriteToAsync(EmailMessage, string, CancellationToken)
Asynchronously write the message to the specified file.
Task WriteToAsync(EmailMessage message, string fileName, CancellationToken cancellationToken)
Parameters
messageEmailMessageThe email message to write
fileNamestringThe file.
cancellationTokenCancellationTokenToken to monitor for cancellation requests
Returns
- Task
A task that represents the asynchronous write to operation