System.Net.Mail.SmtpClient.OnSendCompleted Method

Raises the SmtpClient.SendCompleted event.

Syntax

protected void OnSendCompleted (System.ComponentModel.AsyncCompletedEventArgs e)

Parameters

e
An System.ComponentModel.AsyncCompletedEventArgs that contains event data.

Remarks

Classes that inherit from the System.Net.Mail.SmtpClient class can override the SmtpClient.OnSendCompleted(System.ComponentModel.AsyncCompletedEventArgs) method to perform additional tasks when the SmtpClient.SendCompleted event occurs.

SmtpClient.OnSendCompleted(System.ComponentModel.AsyncCompletedEventArgs) also allows derived classes to handle SmtpClient.SendCompleted without attaching a delegate. This is the preferred technique for handling SmtpClient.SendCompleted in a derived class.

Requirements

Namespace: System.Net.Mail
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0