Rebelmail/nodemailer-mandrill-transport

How to send attachments?

johannesjo opened this issue · 4 comments

First of all: Thanks for the great work! I've got a question though: How would I go about sending an attachment with mandrill. I tried using the standard attachment options of nodemailer, but non of those work. I also tried this:

var emailOpts = {
   attachments: [{
                    name: 'logo.png',
                    type:'image/png',
                    content: 'theBase64String'
  }]
}:

with no success..

@johannesjo That's the next thing we plan to implement for this project, something that translates Nodemailer's attachment API to Mandrills. For now you can use Mandrill's API directly: https://github.com/Rebelmail/nodemailer-mandrill-transport#using-mandrill-api-options

Thank you very much for the quick response. I'll try that.

@johannesjo let us know if it worked for ya'.

It actually did not. I switched to loading the file via HTTP in the end.