Table of Contents

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

SmtpOptions

Methods

SendAsync(EmailMessage, CancellationToken)

Sends an email message asynchronously with cancellation support.

Task SendAsync(EmailMessage message, CancellationToken cancellationToken)

Parameters

message EmailMessage

The email message to send

cancellationToken CancellationToken

Token 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

message EmailMessage

The email message to write

fileName string

The file.

cancellationToken CancellationToken

Token to monitor for cancellation requests

Returns

Task

A task that represents the asynchronous write to operation

To top