Skip to main content

Mandrill

Profile Requirements

To deliver a message to a recipient over Mandrill, Courier must be provided the recipient's email address. This value should be included in the recipient profile as email.

JSON
{
"message": {
// Recipient Profile
"to": {
"email": "example@example.com"
}

// ... rest of message definition
}
}

## Override

You can use a provider override to replace what we send to Mandrill's Messages API. For example, you can add an attachment to your request:

```json title=JSON
{
"message": {
"template": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
"to": {
"email": "example@example.com"
},
"providers": {
"mandrill": {
"override": {
"body": {
"message": {
"attachments": [
{
"type": "text/plain",
"name": "myfile.txt",
"content": "ZXhhbXBsZSBmaWxl"
}
]
}
}
}
}
}
}
}

Everything inside of messageproviders.mandrill.override will replace what we send to Mandrill's Messages API. You can see all the available options by visiting Mandrill API docs.