C# Class MailKit.MailTransport

An abstract mail transport implementation.
An abstract mail transport implementation.
Inheritance: MailService, IMailTransport
Mostra file Open project: jstedfast/MailKit

Public Methods

Method Description
Send ( MimeKit.FormatOptions options, MimeMessage message, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : void

Sends the specified message.

Sends the specified message.

The sender address is determined by checking the following message headers (in order of precedence): Resent-Sender, Resent-From, Sender, and From.

If 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.

Send ( MimeKit.FormatOptions options, MimeMessage message, MimeKit.MailboxAddress sender, IEnumerable recipients, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : void

Sends the specified message using the supplied sender and recipients.

Sends the specified message using the supplied sender and recipients.

Send ( MimeMessage message, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : void

Sends the specified message.

Sends the specified message.

The sender address is determined by checking the following message headers (in order of precedence): Resent-Sender, Resent-From, Sender, and From.

If 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.

Send ( MimeMessage message, MimeKit.MailboxAddress sender, IEnumerable recipients, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : void

Sends the specified message using the supplied sender and recipients.

Sends the specified message using the supplied sender and recipients.

SendAsync ( MimeKit.FormatOptions options, MimeMessage message, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task

Asynchronously sends the specified message.

Asynchronously sends the specified message.

The sender address is determined by checking the following message headers (in order of precedence): Resent-Sender, Resent-From, Sender, and From.

If 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.

SendAsync ( MimeKit.FormatOptions options, MimeMessage message, MimeKit.MailboxAddress sender, IEnumerable recipients, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task

Asynchronously sends the specified message using the supplied sender and recipients.

Asynchronously sends the specified message using the supplied sender and recipients.

SendAsync ( MimeMessage message, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task

Asynchronously sends the specified message.

Asynchronously sends the specified message.

The sender address is determined by checking the following message headers (in order of precedence): Resent-Sender, Resent-From, Sender, and From.

If 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.

SendAsync ( MimeMessage message, MimeKit.MailboxAddress sender, IEnumerable recipients, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task

Asynchronously sends the specified message using the supplied sender and recipients.

Asynchronously sends the specified message using the supplied sender and recipients.

Protected Methods

Method Description
MailTransport ( IProtocolLogger protocolLogger ) : System

Initializes a new instance of the MailKit.MailTransport class.

Initializes a new instance of the MailKit.MailTransport class.

OnMessageSent ( MessageSentEventArgs e ) : void

Raise the message sent event.

Raises the message sent event.

Method Details

MailTransport() protected method

Initializes a new instance of the MailKit.MailTransport class.
Initializes a new instance of the MailKit.MailTransport class.
/// is null. ///
protected MailTransport ( IProtocolLogger protocolLogger ) : System
protocolLogger IProtocolLogger The protocol logger.
return System

OnMessageSent() protected method

Raise the message sent event.
Raises the message sent event.
protected OnMessageSent ( MessageSentEventArgs e ) : void
e MessageSentEventArgs The message sent event args.
return void

Send() public abstract method

Sends the specified message.

Sends the specified message.

The sender address is determined by checking the following message headers (in order of precedence): Resent-Sender, Resent-From, Sender, and From.

If 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.

/// is null. /// -or- /// is null. /// /// The has been disposed. /// /// The is not connected. /// /// Authentication is required before sending a message. /// /// A sender has not been specified. /// -or- /// No recipients have been specified. /// /// The operation has been canceled. /// /// Internationalized formatting was requested but is not supported by the transport. /// /// An I/O error occurred. /// /// The send command failed. /// /// A protocol exception occurred. ///
public abstract Send ( MimeKit.FormatOptions options, MimeMessage message, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : void
options MimeKit.FormatOptions The formatting options.
message MimeKit.MimeMessage The message.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
return void

Send() public abstract method

Sends the specified message using the supplied sender and recipients.
Sends the specified message using the supplied sender and recipients.
/// is null. /// -or- /// is null. /// -or- /// is null. /// -or- /// is null. /// /// The has been disposed. /// /// The is not connected. /// /// Authentication is required before sending a message. /// /// A sender has not been specified. /// -or- /// No recipients have been specified. /// /// The operation has been canceled. /// /// Internationalized formatting was requested but is not supported by the transport. /// /// An I/O error occurred. /// /// The send command failed. /// /// A protocol exception occurred. ///
public abstract Send ( MimeKit.FormatOptions options, MimeMessage message, MimeKit.MailboxAddress sender, IEnumerable recipients, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : void
options MimeKit.FormatOptions The formatting options.
message MimeKit.MimeMessage The message.
sender MimeKit.MailboxAddress The mailbox address to use for sending the message.
recipients IEnumerable The mailbox addresses that should receive the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
return void

Send() public method

Sends the specified message.

Sends the specified message.

The sender address is determined by checking the following message headers (in order of precedence): Resent-Sender, Resent-From, Sender, and From.

If 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.

/// is null. /// /// The has been disposed. /// /// The is not connected. /// /// Authentication is required before sending a message. /// /// A sender has not been specified. /// -or- /// No recipients have been specified. /// /// The operation has been canceled. /// /// An I/O error occurred. /// /// The send command failed. /// /// A protocol exception occurred. ///
public Send ( MimeMessage message, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : void
message MimeKit.MimeMessage The message.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
return void

Send() public method

Sends the specified message using the supplied sender and recipients.
Sends the specified message using the supplied sender and recipients.
/// is null. /// -or- /// is null. /// -or- /// is null. /// /// The has been disposed. /// /// The is not connected. /// /// Authentication is required before sending a message. /// /// A sender has not been specified. /// -or- /// No recipients have been specified. /// /// The operation has been canceled. /// /// An I/O error occurred. /// /// The send command failed. /// /// A protocol exception occurred. ///
public Send ( MimeMessage message, MimeKit.MailboxAddress sender, IEnumerable recipients, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : void
message MimeKit.MimeMessage The message.
sender MimeKit.MailboxAddress The mailbox address to use for sending the message.
recipients IEnumerable The mailbox addresses that should receive the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
return void

SendAsync() public method

Asynchronously sends the specified message.

Asynchronously sends the specified message.

The sender address is determined by checking the following message headers (in order of precedence): Resent-Sender, Resent-From, Sender, and From.

If 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.

/// is null. /// -or- /// is null. /// /// The has been disposed. /// /// The is not connected. /// /// Authentication is required before sending a message. /// /// A sender has not been specified. /// -or- /// No recipients have been specified. /// /// The operation has been canceled. /// /// Internationalized formatting was requested but is not supported by the transport. /// /// An I/O error occurred. /// /// The send command failed. /// /// A protocol exception occurred. ///
public SendAsync ( MimeKit.FormatOptions options, MimeMessage message, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task
options MimeKit.FormatOptions The formatting options.
message MimeKit.MimeMessage The message.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
return Task

SendAsync() public method

Asynchronously sends the specified message using the supplied sender and recipients.
Asynchronously sends the specified message using the supplied sender and recipients.
/// is null. /// -or- /// is null. /// -or- /// is null. /// -or- /// is null. /// /// The has been disposed. /// /// The is not connected. /// /// Authentication is required before sending a message. /// /// A sender has not been specified. /// -or- /// No recipients have been specified. /// /// The operation has been canceled. /// /// Internationalized formatting was requested but is not supported by the transport. /// /// An I/O error occurred. /// /// The send command failed. /// /// A protocol exception occurred. ///
public SendAsync ( MimeKit.FormatOptions options, MimeMessage message, MimeKit.MailboxAddress sender, IEnumerable recipients, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task
options MimeKit.FormatOptions The formatting options.
message MimeKit.MimeMessage The message.
sender MimeKit.MailboxAddress The mailbox address to use for sending the message.
recipients IEnumerable The mailbox addresses that should receive the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
return Task

SendAsync() public method

Asynchronously sends the specified message.

Asynchronously sends the specified message.

The sender address is determined by checking the following message headers (in order of precedence): Resent-Sender, Resent-From, Sender, and From.

If 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.

/// is null. /// /// The has been disposed. /// /// The is not connected. /// /// Authentication is required before sending a message. /// /// A sender has not been specified. /// -or- /// No recipients have been specified. /// /// The operation has been canceled. /// /// An I/O error occurred. /// /// The send command failed. /// /// A protocol exception occurred. ///
public SendAsync ( MimeMessage message, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task
message MimeKit.MimeMessage The message.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
return Task

SendAsync() public method

Asynchronously sends the specified message using the supplied sender and recipients.
Asynchronously sends the specified message using the supplied sender and recipients.
/// is null. /// -or- /// is null. /// -or- /// is null. /// /// The has been disposed. /// /// The is not connected. /// /// Authentication is required before sending a message. /// /// A sender has not been specified. /// -or- /// No recipients have been specified. /// /// The operation has been canceled. /// /// An I/O error occurred. /// /// The send command failed. /// /// A protocol exception occurred. ///
public SendAsync ( MimeMessage message, MimeKit.MailboxAddress sender, IEnumerable recipients, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task
message MimeKit.MimeMessage The message.
sender MimeKit.MailboxAddress The mailbox address to use for sending the message.
recipients IEnumerable The mailbox addresses that should receive the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
return Task