mikermcneil / machinepack-mandrill

Node.js machines for use with the Mandrill API
http://node-machine.org/machinepack-mandrill
5 stars 7 forks source link

How to send a templated email? #1

Closed alexlenail closed 9 years ago

alexlenail commented 9 years ago

I have a sails app, and I want to send an email with a 'confirm account' link, which I have a template for on mailchimp using mandrill. In the documentation I see 'add template' and 'send plaintext email' but no 'send templated email'. I think I'm missing something larger, so if you could point me to a guide that has usage examples, that'd be a huge help!

sgress454 commented 9 years ago

D'oh--it looks like we implemented all of the endpoints around templates (listing, deleting, migrating) except for the one where you actually send a message using a template! So, you're not missing anything, it's just not there. Would be very easy to implement a "Send email (plaintext) using template" machine based on the existing "Send email (plaintext)" machine. If you feel up to it, go ahead and try it out and submit a PR--best way to learn how to write a machine is to copy an existing one! Otherwise we'll leave this issue open and get to the new machine ASAP.

alexlenail commented 9 years ago

Hi Scott, I think I'd prefer if you did it, because I'm not familiar with mandrill, the machinepack architecture, and I wouldn't know where to start with regards to testing after I had made a 'send-template-email' machine which mimicked the other machines in this machinepack. I feel like you could probably whip it up in a half hour. But if you're too busy, then I could try at it this weekend.