Mailchimp is a fantastic service that makes creating and sending HTML emails fast and easy. Mandrill, Mailchimp’s transactional email API, can be used to send lovely HTML emails straight from Drupal, but it needs a bit of configuring. So I thought a blog post was in order.

  1. Install the Mail System, Mailchimp and Mandrill Drupal projects

  2. Enable the Mail System, Mailchimp, Mailchimp Lists, Mailchimp Campaigns, and Mandrill modules.

  3. Fetch your Mailchimp and Mandrill API keys, and copy them into their respective modules’ configuration settings.

  4. Import your Mailchimp lists at /admin/config/services/mailchimp/lists

  5. Go to admin/config/system/mailsystem and change the site-wide default class and the Mandrill module class to ‘MandrillMailSystem’.

  6. Go to admin/config/services/mandrill and change the input format setting to ‘Mailchimp campaign’. There are a few other things to configure here such as the email address you want to send from etc.

  7. Go to admin/config/services/mailchimp/campaigns and click ‘Add a campaign’.

  8. Give the campaign a title and subject, and select a list to send it to.

  9. Select a template for the campaign. There are loads available by default, or alternatively you can create your own using Mailchimp’s Code Your Own template creator on mailchimp.com. It should then appear in the drop down. Once you’ve selected a template, you can fill it with HTML and numerous tokens are available to insert useful Drupal content.

  10. Save the campaign as a draft and test that the email is being sent properly through Mandrill and the campaign template renders as expected. It might be useful just to send the campaign to a list containing just yourself first.

  11. Send your campaign out, and watch the goal conversions roll in.