We wanted to use Mandrill templates in place of Meteor accounts email because with Mandrill templates we can:
- Choose to use an English or Chinese template depending on the customer profile
- Can edit the HTML email at any time without redeploying the app.
- We get handlebars templates in Mandrill
- Mandrill provides some nice tools for editing and previewing your email templates.
There are probably better ways to do this, but we came up with this ‘hack’. In our app we can get the accounts verification link, but we can’t stop the mail from sending via Meteor’s account package. No matter, we shoot it down with a outbound reject rule. Meteor accounts uses our Mandrill SMTP, so we created a rule to match on a special subject which triggers Mandrill to reject the email.
Once that is out of the way, we pass the activation url to a Mandrill template instead.
in our code
Bonus: Campaign Monitor provides a nice free email templating resource. Includes an online editor which allows you to download the final files with styles in-lined