Reputation: 1186
I am using the integrated way of handling login and password management in the Asp.Net MVC.
I'd like to customize the email that comes as result of Forgot Password process.
Now it is very simple, just: Please reset your password by clicking
I want to use my custom text.
Upvotes: 0
Views: 1038
Reputation: 1186
Ah, I seem to have found the code that contains this text:
public async Task<ActionResult> ForgotPassword(ForgotPasswordViewModel model)
{
await UserManager.SendEmailAsync(user.Id, "Reset Password", *"Please reset your password by clicking <a href=\"" + callbackUrl + "\">here</a>"*);
}
I simply should modify that string with my own text or html.
Upvotes: 0
Reputation: 1149
Type up the email template and any variable text you can replace with {0}, {1}, and so on. Then add it as a project setting. When you're ready to send the email pull the setting value (it's the text of the email) and handle it like string.format() to sub in the info for the variable text.
Upvotes: 1