Tevin Thuku Tevin Thuku - 2 months ago 16x
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


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: