Tevin Thuku Tevin Thuku - 1 year ago 92
Javascript Question

Customize Forgot Password Email .Meteorjs

This function below works just fine. But How do I change the sender parameters of the forgot password email.

sendForgotpasswordmail() {
let options = {};
options.email = this.state.email;
Accounts.forgotPassword(options, function(error){

if (error) {
alert('Check your mailbox!');

Whenever I send that I get the sender as
From: "Meteor Accounts" <no-reply@meteor.com>
and that is what I want to change

Answer Source

You should be able to change this by adding the following:

Accounts.emailTemplates.resetPassword.from = function () {
   // Overrides value set in Accounts.emailTemplates.from when resetting passwords
   return "AwesomeSite Password Reset <no-reply@example.com>";

Further explained in the docs: