Following the docs here, I'm trying to set the content of the resetPassword email template but I keep getting undefined.
When I inspect the Accounts object in the console, I see that indeed it doesn't have an emailTemplates property.
Code:
Accounts.emailTemplates.resetPassword.text = function(user, url) {
url = url.replace('#/', '');
return "Click this link to reset your password: " + url;
}
Error:
Uncaught TypeError: Cannot read property 'resetPassword' of undefined
I ended up putting the code in the server directory, and then it worked flawlessly.
What baffles me is that the docs state this property is to be used Anywhere...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With