User-19719568 posted
I have a web application that has a user password login recovery function. I would like to customize the email sending to the user who forgets the password.
I created a PasswordRecoveryMail.txt file under ~/Myfolder/PasswordRecoveryMail.txt I pointed file in the PasswordRecovery1_SendingMail Event.
protected void PasswordRecovery1_SendingMail(object sender, MailMessageEventArgs e)
{
PasswordRecovery1.MailDefinition.BodyFileName = "~/Myfolder/PasswordRecoveryMail.txt";
e.Message.CC.Add("MyEmail Address");
e.Message.Subject = "Your password has been reset ...";
}
As a result, I received the email with correct the email Subject, But the email content keeps the default not what I created in the PasswordRecoveryMail.txt.
What did I miss? Thanks.