What if I want to use my own third party transactional email API, instead of Meteor using an SMTP server? Is there some way to just access variables such as a user’s enrollment link, and pass it via API? e.g.
I just used mandrill as an example since most people are familiar with it. I’ll actually be using Postmark, but they probably allow custom SMTP headers too. Thanks for the tip!
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.
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