On this page
Overview
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
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. This can be achieved using the Mail system module to control which mail goes through Mandrill - read selective use of Mandrill.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion