I'd love to have Meteor use a 3rd party API (in my case, Mandrill) for sendVerificationEmail
, sendEnrollmentEmail
, etc. Has anyone gotten this working?
EDIT: Specifically, I'd like to use templates I have in Mandrill for these system emails. I imagine that I'll have to change some functions in the Accounts package to send names, tokens etc. to Mandrill via an API call. If anyone has done this already, I'd love to hear about it.
Super easy to do this with the mandrill package on atmosphere
meteor add timmyg13:mandrill
Then its just setting it up on your server side:
# in server code
Meteor.startup(function() {
Meteor.Mandrill.config({
username: "YOUR_MANDRILL_USERNAME",
key: "YOUR_MANDRILL_API_KEY"
});
});
And you're set!
The way it does this is it sets your smtp url to the mandrill smtp server, so anything using Meteor's email package will work (like accounts-password)
just change "process.env.MAIL_URL" variable and use something like this:
this.process.env.MAIL_URL = "smtp://{{foobar%40gmail.com}}:{{apikey}}@smtp.mandrillapp.com:587/";
the package that @Akshat said do just that, and as he mentioned the username and apikey should be generated with "encodeURIComponent"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With