2016-08-04 7 views
0

この機能はうまくいきます。しかし、パスワードを忘れた電子メールの送信者パラメータを変更するにはどうすればよいですか。カスタマイズパスワードを忘れた場合電子メール.Meteorjs

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

     if (error) { 
      console.log(error); 
     }else{ 
      alert('Check your mailbox!'); 
     } 
    }); 
} 

私はFrom: "Meteor Accounts" <[email protected]> として送信者を取得し、それは私はあなたが以下の追加により、これを変更することができるはず

答えて

1

を変更したいものであることを送信するたびに:

Accounts.emailTemplates.resetPassword.from = function() { 
    // Overrides value set in Accounts.emailTemplates.from when resetting passwords 
    return "AwesomeSite Password Reset <[email protected]>"; 
}; 

さらに説明ドキュメント内:
http://docs.meteor.com/api/passwords.html#Accounts-emailTemplates

+0

これは機能します。私はmeteor start_upメソッドのコードを入れて、それが働いた –

関連する問題