System.Net.Mail.SmtpClient: Method Members

The methods of System.Net.Mail.SmtpClient are listed below. For a list of all members, see the SmtpClient Members list.

See Also: Inherited members from System.Object

Public Methods

Dispose()

Sends a QUIT message to the SMTP server, gracefully ends the TCP connection, and releases all resources used by the current instance of the System.Net.Mail.SmtpClient class.

Send(MailMessage)

Sends the specified message to an SMTP server for delivery.

Send(string, string, string, string)

Sends the specified e-mail message to an SMTP server for delivery. The message sender, recipients, subject, and message body are specified using string objects.

SendAsync(MailMessage, object)

Sends the specified e-mail message to an SMTP server for delivery. This method does not block the calling thread and allows the caller to pass an object to the method that is invoked when the operation completes.

SendAsync(string, string, string, string, object)

Sends an e-mail message to an SMTP server for delivery. The message sender, recipients, subject, and message body are specified using string objects. This method does not block the calling thread and allows the caller to pass an object to the method that is invoked when the operation completes.

SendAsyncCancel()

Cancels an asynchronous operation to send an e-mail message.

Protected Methods

Dispose(bool)

Sends a QUIT message to the SMTP server, gracefully ends the TCP connection, releases all resources used by the current instance of the System.Net.Mail.SmtpClient class, and optionally disposes of the managed resources.

OnSendCompleted(System.ComponentModel.AsyncCompletedEventArgs)

Raises the SmtpClient.SendCompleted event.