Reputation: 115
I'm getting an annoyingly vague Internal server error in my meteor Accounts.forgotPassword callback. I have accounts-base installed and I know my SMTP settings (defined on the server in Meteor.startup) are fine because I can call Email.send successfully.
Here's the code. It's pretty generic, so I'm not at all sure what could be going wrong. Any thoughts?
var options = {};
options.email = "[email protected]";
Accounts.forgotPassword(options, function(err){
if (err) {
console.log("error: "+err.reason);
} else {
console.log("Success!");
}
});
Upvotes: 2
Views: 331
Reputation: 620
One simply needs to overwrite the Accounts
package's email template's from
function:
Accounts.emailTemplates.resetPassword.from = () => 'me <[email protected]>';
It's future safe to also:
Accounts.emailTemplates.from = () => 'me <[email protected]>';
Upvotes: 2