Expanded Rules Options, Easier BCC/CC Support, and Accessing Message Content

This week, we have a few small improvements to announce. Rules options have been expanded to give you more control over your sending, Cc and Bcc options have been added to the sending APIs, and message content is now accessible through the API.

Expanded Rules Options

Mandrill's rules engine lets you modify the content and behavior of messages based on general criteria, like the sender address or the API key used to send the message. New options let you change the subaccount, tracking domain, SPF/DKIM signing domain, and Return-Path domain of messages that match your rule criteria. This is a good option if you can't change the SMTP headers or content yourself -- for example, if you're using a CRM or third-party system that doesn't allow you to add custom headers.

Cc and Bcc Shortcuts Added to API

In a lot of cases, sending through Mandrill's API gives you more flexibility and can improve performance (SMTP is chatty). Until now, specifying Cc and Bcc headers using the API required manually creating the To and Cc headers in addition to specifying the recipients in the to parameter, which is annoying. With this change, when you specify the recipient list in your API call, just set the recipient's type parameter to "cc" or "bcc", and we'll create the headers automatically. You can find more documentation about this in the API docs. Here's an example /messages/send.json API call:

{"key": "example-abc", "message": {
    "from_email": "sender@example.com",
    "subject": "A test message with a CC and BCC recipient",
    "text": "Example message.",
    "to": [
        {"email": "to@example.com", "name": "Default is To"},
        {"email": "cc@example.com", "type": "cc"},
        {"email": "bcc@example.com", "type": "bcc"}

Message Content API

Mandrill stores the full content of every message you send for at least 24 hours. This can be a lifesaver for auditing your content, or just when testing to make sure the content is correct. Now, this information is also available through the API. You can access the full HTML and text of the message as it was sent, any attachments, and custom headers that were provided. The full documentation is in the API docs.