Last updated August 17, 2014. Created on October 22, 2012.
Edited by glass.dimly, rvb, peterx. Log in to edit this page.

Mailchimp provides an email service with some useful features and the results stored on the Mailchimp server. Mandrill is their other option and returns the results to your Web site through callbacks. Use Mandrill when you already use Mailchimp and want the results from your mail back in your Drupal database.

Installation

Download and install as for any add-on module. There are two modules installed, Mandrill and Mandrill Reports. This page is for Mandrill. There is a child page for the Mandrill Reports module.

First, you'll need to install the Mandrill PHP library. Install or enable the libraries module and then put the library in a directory named "mandrill" under "libraries."

Switch on Mandrill in the modules list. Mandrill has a .install file and no install function. Nothing happens until you switch on the Mandrill activity in the configuration page. There are hook_disable() and hook_uninstall() to clean up afterwards.

Mandrill ends up in Administration >> Modules under package MailChimp. There is a permission to set and configuration page at admin/config/services/mandrill.

Permission

There is just one permission for Mandrill, Administer Mandrill. Most sites will use the default of only letting the site administrator access the configuration page.

Configure

You need a Mandrill API key from https://mandrillapp.com/. Login with your Mailchimp id or register and login. You can send up to 12000 mails per month without paying for the service.

The config form:
Mandrill API Key
[ ]
Create or grab your API key from the Mandrill settings.
Mandrill settings links to https://mandrillapp.com/settings/index

Save the settings. You are then presented with more options. One option is to switch the Mandrill mail interface on, off, or to test. The default is Off. On will send all your mail to Mandrill, something you may not want until you have mandrill working the way you want.

The Test option lets you test without connecting to the Mandrill server, a good option when you first test on a machine not connected to the Internet.

Mandrill let you open an account and test up to 12000 mail per month without paying anything and that is your next level of testing but you have to switch mandrill on and at that point all mail will go to Mandrill.

There is a test described in the Mandrill Reports page.

Selective mail

You might want some of your mail sent through Mandrill but not all mail sent through Mandrill. I am experimenting with the Mail system module to control which mail goes through Mandrill. See http://drupal.org/node/1817506

README.txt

Integration with Mandrill transactional emails, a service by the folks behind

MailChimp. Learn more about Mandrill and how to sign up on [their website](http://mandrill.com).

## Settings

### Mandrill Mail interface status

#### On

Routes all site emails through the STS API.

#### Test

Enables an alternate mail interface, TestingMailChimpMandrillMailSystem, that

displays a message and logs the event without sending any emails.

Logs can be viewed through Mandrill Reports at .

#### Off

Disables Mandrill and routes all email through the site's server.

### Email Options

* **Email from address:** The email address that emails should be sent from

* **From name:** The name to use for sending

* **_Input format_:** An optional input format to apply to the message body before sending emails

### Send Options

* **Track opens:** Toggles open tracking for messages

* **Track clicks:** Toggles click tracking for messages

* **Strip query string:** Strips the query string from URLs when aggregating tracked URL data

### Google Analytics

* **Domains:** One or more domains for which any matching URLs will

automatically have Google Analytics parameters appended to their query string.

Separate each domain with a comma.

* **Campaign:** The value to set for the utm_campaign tracking parameter. If

empty, the from address of the message will be used instead.

## Reports

The mandrill_reports sub-module provides reports on various metrics.

### Dashboard

Displays charts that show volume and engagement, along with a tabular list of

URL interactions for the past 30 days.

### Account Summary

Shows account information, quotas, and all-time usage stats.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

evancjensen’s picture

Hello,

After installing and enabling mandrill, and submitting my api key, the config page won't load. When I go to [mysite]/admin/config/services/mandrill it just sits with a blank white page. Any suggestions?

Thanks

You stay classy, Planet Earth.

glass.dimly’s picture

As per the module page, you'll also need to install the Madrill PHP library. I'm updating this doc to reflect that.