Community Documentation

MailChimp

Last updated April 30, 2013. Created by arianek on November 8, 2011.
Edited by batigolix, gcb, pmackay, hirbys. Log in to edit this page.

Note: more documentation for the Drupal 7 version of the MailChimp module is also available in the README files of the submodules.

About

The MailChimp module integrates with MailChimp, the popular email delivery service.

Features

  • Embed subscription forms for any MailChimp list with custom meta data and a block for each list.
  • Enables end users to manage their subscriptions from their account page.
  • Allows end users to subscribe to lists during registration.
  • Lets you map user tokens to MailChimp merge fields.
  • Provides required, optional, and freeform lists. Required lists are automatically synchronized with the sites users. Optional lists provide a checkbox allowing users to subscribe during registration or when updating their account. Free form lists present a signup form with all MailChimp merge fields displayed.
  • Allows subscriptions to be maintained via a batch process during cron or in real time.
  • Allows the option of also enabling list "interest group" subscriptions, for more fine grained mailing list control.

Install

(Versions 7.x-2.8 and higher).

  1. Install the module MailChimp and the required module Libraries in the usual way.
  2. Download the MailChimp API library and extract it to the libraries folder, so that the API library can be found at libraries/mailchimp/MCAPI.class.php

Configure

  1. Configure the module at Administration > Configuration > Web services > MailChimp (http://example.com/admin/config/services/mailchimp)
  2. Enter a MailChimp API key 2. You will need to put in your Mailchimp API key for your MailChimp account (select "API keys and Authorized Apps" from the Account dropdown menu)

Versions

The MailChimp module is supported in both Drupal 7 and Drupal 6.

Drupal 7

Prior to 7.x-2.x, the module is a simple port from Drupal 6. 7.x-2.x was a complete rewrite of the module, sponsored by MailChimp with several major improvements. You can read more about it on the MailChimp blog.

In Drupal 7, MailChimp module:

  • You can also turn all of your Drupal emails into transaction emails via the MailChimp STS API. (7.x-2.x only)
  • You can create an unlimited number of mailing lists, linking them to your MailChimp lists based on a user's role.
  • To create blocks to allow people to subscribe be sure to use the Free form style of subscription list.
  • You can enable list activity display, allowing any entity with an email address to display a history of Mailchimp activity for that email address. (7.x-2.x only)

Their STS service lets Drupal send and save all its emails (both transactional email and your bulk email) right through MailChimp. There's also the kind of delivery reporting that you'd normally only get with an e-newsletter, so you can check which of your emails are being read, deleted, etc.

Drupal 6

The Drupal 6 version does not include the MailChimp Lists, MailChimp STS, or MailChimp Activity modules, and therefore does not allow you to:

  • Turn your Drupal emails into transaction emails.
  • Automatically subscribe users by role to specific lists.
  • Display a history of activity for a given email address in Drupal.

Importing newsletters as nodes

There is also an unofficial contributed module called "MailChimp import" which you can download here. This module helps you to automatically import your newsletters into your site when they're sent out so you can have copies available directly on your site. (This module is really old now, but if someone would like to adopt and update/maintain, please do!)

Enabling signups to "Interest Groups"

In MailChimp, within each list, there's the option to also set up "Interest Groups", which are subsets of each list. To add these options to the signup and register forms:

  1. Once you've set up the Interest Groups in MailChimp, return to your MailChimp admin page in your Drupal 6 site (Administer > Site configuration > MailChimp or http://example.com/admin/settings/mailchimp).
  2. Under "User settings", check the "Show Interest Groups on Registration and Account Forms" box.
  3. Scroll down and click "Save configuration".
  4. Log out and visit the subscription (http://example.com/mailchimp/subscribe) or registration form (if enabled there) to see the options displayed.

Tips

  • On 7.x-2.x, the requirement in the .info file for libraries >= 2.0 is not properly enforced, so you need to manually check/upgrade your version of libraries.
  • As of 7.x-2.8, the MCAPI library is no longer included with the module, and must be installed separately. The included .make.example file shows how to include this library in your drush make, or you can install it manually.
  • Don't use test@example.com when testing MailChimp; it's an invalid address and MailChimp is good at validation so the tests will fail.
  • MailChimp has a TON of additional resources and documentation on their site at http://mailchimp.com/resources

Technical details

Drupal 7

Default module: No.
Dependencies: libraries >= 2.0
Related modules: None.
Sub-modules: MailChimp Lists, MailChimp STS (required to add subscribe blocks).
Permissions: Administer MailChimp.
API Documentation: None.
Database tables: cache_mailchimp_user.

Drupal 6

Default module: No.
Dependencies: None.
Related modules: None.
Permissions: Administer MailChimp.
API Documentation: None.
Database tables: mailchimp_user.

More information

For support, questions, feature requests et ceterea use the MailChimp issue queue

Page status

Needs copy/style review

Log in to edit this page

About this page

Drupal version
Drupal 6.x, Drupal 7.x
Level
Beginner, Intermediate
Audience
Programmers, Site administrators
Keywords
bulk mail, email, mailchimp, newsletters, third-party integration

Site Building Guide

Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here