Accounts.emailTemplates is undefined

meteor

Solution

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`...

Problem

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 ```

Original source