Having trouble sending an email with an attached document via the Mandrillapp JSON API using the method send-template
in JavaScript. The email sends successfully, including images attached to the images
array. However, documents sent in the attachements
array with base64 content are not being delivered. Below is an example of the request:
url:
https://mandrillapp.com/api/1.0/messages/send-template.json
POST data:
"key":"private key",
"message": {
attachements: [
{content: "dGVzdA0K", name: "test.txt", type: "text/plain"}
],
images: [
{content: "iVBORw0KGgoAAAAN...", name: "img.png", type: "image/png"}
],
...
}
...
The message gets received with the image attachment, but the text document does not come through. I've tried multiple times and still can't get it to work.