Skip to navigation

Send a raw message

Send a raw MIME document for a message, and send it exactly as if it were sent through Mandrill’s SMTP servers.

Request

This endpoint expects an object.
keystringRequired
A valid Mandrill API key
raw_messagestringRequired
the full MIME document of an email message
from_emailstring or nullOptionalformat: "email"

optionally define the sender address - otherwise we'll use the address found in the provided headers

from_namestring or nullOptional
optionally define the sender alias
tolist of stringsOptional

optionally define the recipient to receive the message - otherwise we'll use the To, Cc, and Bcc headers provided in the document

asyncboolean or nullOptional

enable a background sending mode that is optimized for bulk sending. In async mode, messages/send will immediately return a status of "queued" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.

ip_poolstringOptional
the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.
send_atstringOptionalformat: "^$|^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(\.\d+)?$"

when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately; for future dates, you're limited to one year from the date of scheduling.

return_path_domainstring or nullOptional

a custom domain to use for the messages' return-path

Response

Success

Errors

401
Unauthorized Error
402
Payment Required Error
404
Not Found Error
500
Internal Server Error