Using Accounts.emailTemplates.resetPassword.html correctly in Meteor

I have no problem using Accounts.emailTemplates.resetPassword.text, but if I also use Accounts.emailTemplates.resetPassword.html, I do not receive the HTML letter.

Is there any example of the correct use of Accounts.emailTemplates.resetPassword.html?

+4
source share
1 answer

It is very easy to use - just as you would use text. See the example below, it will send the return value as an email body. It works for all three: resetPassword, verifyEmailand enrollAccount.

Accounts.emailTemplates.verifyEmail.html = function (user, url) {
    return "<h1>Thanks for signing up!</h1>"
    + " To <strong>activate</strong> your account, click the link below:\n\n"
    + url;
};

, : html. , HTML- , , text html .

+1

Source: https://habr.com/ru/post/1532907/


All Articles