<asp: PasswordRecovery> How to customize the email sent to the user?

I am currently setting up a basic membership system in ASP.NET and have used

<asp:PasswordRecovery ID="PasswordRecovery1" Runat="server"></asp:PasswordRecovery>

      

To deal with password recovery, which works great, but how do I customize the email, such as changing the subject "Subject" and the actual content of the email body?

+2


a source to share


2 answers


Implement the OnSendingMail event to manage password recovery.



the parameter (MailMessageEventArgs e) is a MailMessage object and you can update the subject / body fields, etc. before the message is actually sent.

+6


a source


You can edit the MailDefinition settings .



MailDefinition-BodyFileName="uri"
MailDefinition-CC="string"
MailDefinition-From="string"
MailDefinition-IsBodyHtml="True|False"
MailDefinition-Priority="Normal|Low|High"
MailDefinition-Subject="string"

      

+2


a source







All Articles