Skip to content Skip to sidebar Skip to footer

Why Is The Customized Meteor Accounts Verification Email Not Display As Html?

Here's my code in imports/api/friends/methods.js: import {Meteor} from 'meteor/meteor'; import {Accounts} from 'meteor/accounts-base'; if (Meteor.isServer) { Accounts.emailTe

Solution 1:

You used the wrong function. If you use Accounts.emailTemplates.verifyEmail.text, the body will be returned as text and not as HTML. So instead, you should use Accounts.emailTemplates.verifyEmail.html.

For example:

Accounts.emailTemplates.verifyEmail.html = function(user, url) {
    /* Return your HTML code here: */return'<h1>Thank you for your registration.</h1><br/><a href="' + url + '">Verify eMail</a>';
};

Read more about Accounts.emailTemplates.

Post a Comment for "Why Is The Customized Meteor Accounts Verification Email Not Display As Html?"