Mandrill- Attachments not sending attachment -
Mandrill- Attachments not sending attachment -
i attempting send little rtf attachment through mandrill. have created next json , tried using api test page. attachment base of operations 64 encoded. api reports no error , email comes through no attachment. doing wrong?
{ "attachments": [ { "type": "application/rtf", "name": "test.rtf", "content": "e1xydgyxxgfuc2lcyw5zawnwzzeyntjczgvmzjbczgvmbgfuzziwntd7xgzvbnr0ymx7xgywxgzuawxczmnoyxjzzxqwienhbglicmk7fx0ncntcklxnzw5lcmf0b3igtxnmdgvkaxqgns40ms4yms4yntewo31cdmlld2tpbmq0xhvjmvxwyxjkxhnhmjawxhnsmjc2xhnsbxvsddfcbgfuzzlczjbcznmymib0aglziglzigegdgvzdcbzzw5kaw5nigzpbgvccgfydqp9dqoa" } ], "message": { "html": "<html>\r\n<body>test data</body>\r\n</html>\r\n", "subject": "cloud demo", "from_email": "jklovanc@hotmail.com", "preserve_recipients": true, "text": "", "to": [ { "type": "to", "name": "", "email": "jklovanc@hotmail.com" } ], "from_name": "", "headers": { "reply-to": "jklovanc@hotmail.com" } }, "key": #mykey#, "async": false
}
attachments part of message object, attachments parameter should nested under message instead of @ same level. should instead:
{ "message": { "attachments": [ { "type": "application/rtf", "name": "test.rtf", "content": "e1xydgyxxgfuc2lcyw5zawnwzzeyntjczgvmzjbczgvmbgfuzziwntd7xgzvbnr0ymx7xgywxgzuawxczmnoyxjzzxqwienhbglicmk7fx0ncntcklxnzw5lcmf0b3igtxnmdgvkaxqgns40ms4yms4yntewo31cdmlld2tpbmq0xhvjmvxwyxjkxhnhmjawxhnsmjc2xhnsbxvsddfcbgfuzzlczjbcznmymib0aglziglzigegdgvzdcbzzw5kaw5nigzpbgvccgfydqp9dqoa" } ], "html": "<html>\r\n<body>test data</body>\r\n</html>\r\n", ....
mandrill
Comments
Post a Comment