System.Web.UI.WebControls.PasswordRecovery.SendingMail Event

Occurs before the user is sent a password in e-mail.

Syntax

public event MailMessageEventHandler SendingMail

Remarks

The PasswordRecovery.SendingMail event occurs on the server after the user requests a new or recovered password and submits a correct answer to the password confirmation question (if your membership provider supports password question and answer), but before the password is sent to the user in e-mail. Use this event to do any special processing required before sending the e-mail message, such as setting System.Web.Mail.MailMessage properties.

After the user enters a valid user name and, if relevant, a valid answer, the System.Web.UI.WebControls.PasswordRecovery control raises the PasswordRecovery.SendingMail event, and then sends the password information to the user in e-mail. The e-mail uses the settings defined in the <smtpMail> configuration file element.

For more information about handling events, see Consuming Events.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0