ChangePassword.SendMailError Event

Definition

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

C#
public event System.Web.UI.WebControls.SendMailErrorEventHandler SendMailError;

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

Produkt Verzie
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also