IMailTransportSend(ISendRequest, CancellationToken) Method

Send a message.

Definition

Namespace: MailKit
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
C#
SendResult Send(
	ISendRequest request,
	CancellationToken cancellationToken = default
)

Parameters

request  ISendRequest
The send request.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

SendResult
The result of sending the message.

Remarks

Sends a message as specified by the request.

If the request does not specify a Sender, the sender address is determined by checking the following message headers (in order of precedence): Resent-Sender, Resent-From, Sender, and From.

If the request does not specify any Recipients and either the Resent-Sender or Resent-From addresses are present, the recipients are collected from the Resent-To, Resent-Cc, and Resent-Bcc headers, otherwise the To, Cc, and Bcc headers are used.

See Also