Hi All:
In my Meteor-Angular app, I’m trying to customize the email that is sent with a sendPasswordReset request.
I’ve created a emails.ts file on the server side with the following:
import { Accounts } from 'meteor/accounts-base';
Accounts.emailTemplates.siteName = "Site Test";
Accounts.emailTemplates.from = "test.ca";
Accounts.emailTemplates.resetPassword = {
subject() {
return "[test] Reset Password Request";
},
text( user, url ) {
let emailAddress = user.emails[0].address,
urlWithOutHash = url.replace( '#/', '' ),
emailBody = `We received an account recovery request on test.ca for {{emailAddress}}.\n\n
If you initiated this request, click this link to reset your password.\n
{{urlWithOutHash}}\n\n
If you did not initiate this account recovery request, just ignore this email. We'll keep your account safe.`
return emailBody;
}
};
However, every time I submit a recover password request I received the canned response:
Hello,
To reset your password, simply click the link below.
http://localhost:3000/#/reset-password/TUHClXy9QSKs4udIFTHL1wTw9JKo72kC29hUvx893d3
Thanks.
Any suggestions would be appreciated.
Thanks!