How to customize meteor account email templates? In Meteor startup I have:
Accounts.config({
sendVerificationEmail: true
});
Is there a way to configure email template? For example, there is a verification link in email, I have to change the link into button.
You can customise the verifyEmail
component by using the following function:
Accounts.emailTemplates.verifyEmail.text = function(user, url) {
return 'Your custom text, URL:' + url;
};
Since you want to change the link, you may want to use:
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
.