Last updated 28 September 2016. Created on 8 November 2011.
Edited by mikebrooks, amyvs, dasginganinja, ashish_nirmohi. Log in to edit this page.

Note: more documentation for the Drupal 7.x and 8.x versions of the MailChimp module are also available in the README files of the submodules.


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


  1. Embed subscription forms for any MailChimp list with custom meta data and a block for each list.
  2. Enables end users to manage their subscriptions from their account page.
  3. Allows end users to subscribe to lists during registration.
  4. Lets you map user tokens to MailChimp merge fields.
  5. 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.
  6. Allows subscriptions to be maintained via a batch process during cron or in real time.
  7. Allows the option of also enabling list "interest group" subscriptions, for more fine grained mailing list control.

Installation Notes

IMPORTANT: The 7.x-2.x and 7.x-3.x branches rely on MailChimp’s API version 2.0 and will become unsupported by MailChimp at the end of the year 2016. Please see this link for more information. To upgrade to the latest version, please review the main README.txt file in the 7.x-4.x branch.


The 8.x-1.x release uses version 3.0 of the MailChimp API and bundles the library with the module. This is a temporary solution until the process for installing libraries via composer is finalized in Drupal 8.


The 7.x-4.x release uses version 3.0 of the MailChimp API. A new library is available here and will need to replace the old library if you are upgrading the module from 7.x-3.x or 7.x2.x.

See the README.txt for library installation instructions.

7.x-3.x and 7.x-2.x

Don't use these branches. Use the 7.x-4.x branch instead.


  1. Configure the module at Administration > Configuration > Web 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" from the Account->Extras dropdown menu)


  1. Don't use when testing MailChimp; it's an invalid address and MailChimp is good at validation so the tests will fail.
  2. MailChimp has a TON of additional resources and documentation on their site at

More information

For support, questions, feature requests et ceterea:

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


jutulen’s picture

Here is a nice recipe for exporting the subscriber list from Simplenews (D6) using the database to run a SQL query:
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.

teri2306’s picture

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,
- Download the libraries module,
- Download the current MailChimp MCAPI module, (
- 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 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

Cas’s picture

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

iknowbryan’s picture

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

stevenx’s picture

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

vetharmon’s picture

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!

sbordage’s picture

I tried everything but it was NOT good advice.
The correct advice is to follow install THEN clear cache.

Hope it helps,

muellm’s picture

Unfortunately the documentation of the module is not very extensive. If you are trying to subscribe a user programatically to a mailchimp list this example might help.

Before you start you have to make sure you have the mailchimp_lists module enabled and configured, even if you do not use it and simply want to subscribe users to a list on mailchimp, as it holds the configuration options of a mailchimp module in drupal.

//unfortunatly you cannot use mailchimp_get_list(), but need to install the mailchimp_lists module to add a user to a simple list
$list = mailchimp_lists_load_multiple_by_name('mailchimp_listname_in_drupal');
	$merge_vars = array(
		'EMAIL' => $account->mail,
		'FNAME' => $firstname, //you  set it
		'LNAME' => $lastname, //you set it
	$success = mailchimp_subscribe_user($list, $account->mail, $merge_vars, false);
} else {
	drupal_set_message('List not configured in Drupal');

cds-CMS’s picture

Drupal 7.34, Mailchimp 7.x-3.2. A campaign is created on the Mailchimp website. But if I choose to import it into Drupal I've :
Fatal error: Call to a member function label() on a non-object in my_local_server\sites\all\modules\contrib\entity\entity.module on line 1134
Why ?

Thanks a lot for your help

cds-CMS’s picture

It seems is only for paid.

Webstar7’s picture

I have setup a webform in Mailchimp that I would like to use as a pop-up. What are the steps required to install the webform as a pop-up within Drupal 6?

Please let me know.

Ssangeet’s picture

Fatal error: Class 'Mailchimp' not found in E:\xampp\htdocs\drupal\modules\mailchimp\src\DrupalMailchimp.php on line 19

I am getting above mentioned error as i click on configuration tab.any help would be great as i am not know how to disable it?

I installed 8.x.x alpha version & i am using 8.0.3(latest) version of drupal.

taherj’s picture

I faced the same issue described by you,

Kindly follow this issue

First Follow this and install composer manager and do composer drupal-update,

Then add this line in this file /conrib/mailchimp/src/DrupalMailchimp.php just below line 11 i.e use Mailchimp; which actually causes the above mentioned error.

require_once ($_SERVER['DOCUMENT_ROOT']. '/vendor/mailchimp/mailchimp/src/Mailchimp.php');

The error should now be resolved.

Ssangeet’s picture

i am new for drupal ,even for CMS languages & seriously #Drupal has quite a complex structure & even a UI too.There are not many good tutorial for intermediate/advanced level.

By the way i stopped working on that project & fresh start with Drupal's more stable version 7.

Ptitpissenlit’s picture

I've installed the 7.x-4.x release on my Drupal 7 site and I'm not sure to have well understood the orders for its installation : it says to use version 3.0 of the MailChimp API library.
But in the readme file of this library, it says that it is necessary to install both Composer and Guzzle.
The Composer module pose me a problem : as I'm on a shared web hosting service, I've searched a module for Drupal and not the link given in the readme file (which require to use the terminal, what I can't do). But the Composer module exist only for Drupal 8.
Have I misunderstood something ?

cbhdtech’s picture

Hi Everyone,

I installed the module 7.x-4.x and v1.0.4 of the mailchimp-api-php. I already had libraries installed on the site. I am getting a PHP error and am unable to proceed with setup. It is saying: "This module requires PHP version 5.5.* and is incompatible with PHP version 5.3.29." We can update our PHP version, but they may cause some issues elsewhere on the site. Any recommendations to fix this?


hydrant-mark’s picture

Hi cbhdtech,

Unfortunately there is no way around the need for updating your PHP version. The version of Mailchimp API library needed for the module 7.x-4.x requires PHP 5.5 as a minimum.

Although, strictly speaking PHP 5.5 has reached it's end of life, and has not been receiving security updates since around August 2016 (see .

If you can, I would recommend testing your site on a clone of your production server that has been updated to a newer version of PHP. This will allow you to safely check for any issues, and allow you to resolve them before applying any update to the live server.

PHP 7.0 is still under active support, and 5.6 is currently receiving security updates only until January 2019.