Rediger

Del via


ChangePassword.SendMailError Event

Definition

Occurs when there is an SMTP error sending an email message to the user.

public:
 event System::Web::UI::WebControls::SendMailErrorEventHandler ^ SendMailError;
public event System.Web.UI.WebControls.SendMailErrorEventHandler SendMailError;
member this.SendMailError : System.Web.UI.WebControls.SendMailErrorEventHandler 
Public Custom Event SendMailError As SendMailErrorEventHandler 

Event Type

Remarks

The SendMailError event is raised when the SMTP mail provider throws an exception when trying to send an email message after users have changed their password. The most common reason that this event is raised is that the smtp section of the Web.config file is incorrect. For more information about the smtp section, see <smtp> Element (Network Settings).

The default SendMailError event handler does not catch or handle the SMTP error from the mail system. Your SendMailError event handler must set the Handled property of the SendMailErrorEventArgs object to true in order to stop the error from being displayed to users.

For more information about handling events, see Handling and Raising Events.

Applies to

See also