Last updated March 19, 2014. Created by arianek on November 8, 2011.
Edited by owenpm3, kae76, vetharmon, gcb. 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.
  • Allows you to make lists required for certain user roles, and optionally allow anonymous users to subscribe by presenting 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 sites/all/libraries/mailchimp. You have to (potentially) create both the libraries and the mailchimp directory.

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, or set the "Allow Anonymous" option on version 7.x-2.11 or later.
  • 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.8 or later)

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
Dependencies: MCAPI library (For versions 7.x-2.8 and greater)
Related modules: None.
Sub-modules: MailChimp Lists, MailChimp STS (NB:depreciated).
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

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

Comments

Here is a nice recipe for exporting the subscriber list from Simplenews (D6) using the database to run a SQL query: https://drupal.org/node/579568
If you export the list as CSV it's possible to import this into MailChimp.

The table structures are different in the D7 version of Simplenews so the SQL queries don't work without some modifications.

I found this fix under Mailchimp issues but really had to search to find the fix, it would be nice to include this in the Readme File for Mailchimp or provide this detail in the install for Drupal 7.

Posted by kanshin on January 30, 2013 at 3:36pm

Title: Can't get module to recognize library » Fix for "Can't get module to recognize library"
Status: closed (fixed) » needs review

This is what worked for me in solving the issue after updating to MailChimp 2.10 from a previous version in an installation of Drupal 7.19 running on Windows 7:

- Disable all the MailChimp components (and Libraries, if you had installed it previously)
- Uninstall all the MailChimp components (and Libraries, if you had installed it previously). Delete the mailchimp (and the libraries) directory from the /sites/modules directory
- Download the MailChimp module, http://drupal.org/project/mailchimp
- Download the libraries module, http://drupal.org/project/libraries
- Download the current MailChimp MCAPI module, http://apidocs.mailchimp.com/api/downloads/#php (mailchimp-api-class.zip)
- In the administrator pages >> Modules >> Install new module, find the libraries-7.x-2.0.tar module and install it
- Enable the new Libraries module (it is located in the "OTHER" group)
- Unpack the same libraries-7.x-2.0.tar file and add it to /sites/all
- Create the mailchimp directory in your new /sites/all/libraries (/sites/all/libraries/mailchimp)
- Unpack the mailchimp-api-class.zip file and add its MCAPI.class php and readme.txt files to /sites/all/libraries/mailchimp directory
- Create a mailchimp directory in the /sites/modules/libraries and add the same MCAPI.class php and readme.txt files to the new /sites/modules/libraries/mailchimp directory
- In the administrator pages >> Modules >> Install new module, find the mailchimp-7.x-2.10.tar module and install it
- Enable MailChimp
- Go to Reports >> Status report, and in the MailChimp section you should see the "The MailChimp MCAPI wrapper library is installed correctly." message

Teri Taylor

For me the library was was recognized by changing the permissions for the /libraries/mailchimp -directory to 750

Same here. Was a folder permissions issue.
chmod 755 sites/all/libraries/mailchimp
fixed it for me

Also fixed this for me. happening a white screen of death running on ngix...

I had to really search for the solution to this issue as well.

For me, I installed the MCAPI.class.php and the readme.txt file in the wrong place. I placed it under the libraries api module directory instead of sites/all/libraries/mailchimp. If you are starting a new website, you may not have a libraries directory created.

To be clear the WRONG place is sites/all/modules/libraries/mailchimp.
The CORRECT place is sites/all/libraries/mailchimp. You have to (potentially) create both the libraries and the mailchimp directory. The advice in many of the posts says put it in your libraries sub-directory which is confusing.

In the official directories it says to put it in the libraries directory, but it also requires the install of the libraries module which creates the only directory in a simple install titled libraries. The directions should be edited so that the correct directory is more obvious. I stumbled across the answer by reading many many posts on this problem. For veteran drupal users this is probably super simple, but I spent a day and a half on this problem. I hope that this clears things up a bit.

Happy New Year!

Tim Harmon

I tried everything but it was NOT good advice.
The correct advice is to follow install THEN clear cache.
Source: https://drupal.org/node/2054037

Hope it helps,
Stephane