Mailchimp + Magento: How to get autoresponders working with the API
Just a quick little how-to on Mailchimp and Magento using the existing extension by Ebizmarts. We want to be able to send customers who sign up for the newsletter through the Magento store a little thank you gift (discount code) X days after signing up using Mailchimp’s excellent autoresponders. This is supported by Mailchimp, but requires double opt-in or the following little 2 step work-around with the Mailchimp API.
For this I’ll assume you have got as far as the Mailchimp list being populated when a Magento customer subscribes, and removed when they unsubscribe. This will require a little modification to the Magento and Mailchimp integration, so only proceed if you’re comfortable with that.
Step 1: Configure your Mailchimp list to have a pseudo sign up date
This is mentioned in the Mailchimp support section, but I’ll quickly add my notes here for completeness.
Go into the lists section and select the forms link for the particular list you are adding emails to from within Magento. From the forms page you can add a new date field that looks something like this:
Note that whatever you choose for the field tag e.g. SIGNON on this screen needs to match what you use in the code change I’ll show you in step 2. What a perfect segue….
Step 2: Modify the Mailchimp extension (ever so slightly)
The code change is very minor, and assumes you always want to add this Merge var – so it’s not very elegant. In fact it’s arguably a hack, but I haven’t posted one of those for a while so here goes. Modify the file app/code/local/Ebizmarts/Mailchimp/Model/Mailchimp/Mailchimp.php around line 114 so that it looks like this:
if ( $this->getXMLSubscribeConfig('opt-in') != '' ) { $merge_vars['OPTINIP'] = $this->getXMLSubscribeConfig('opt-in'); } // Add this line - be sure you match 'SIGNON' here with the code you chose in Mailchimp... $merge_vars['SIGNON'] = date("Y-m-d"); // today's date try { $apikey = $this->getXMLGeneralConfig('apikey');
Right so with that change, your Mailchimp list will now get a new variable populated which can in turn be used as a date for the autoresponders within Mailchimp like so:
Interestingly this same approach can be used to add all sorts of useful information gained from Magento into your Mailchimp list e.g. Source of visit CPC/Organic etc.
Note: this code change will go away if you upgrade the Mailchimp extension – maybe someone will make this part of the extension so that it is less prone to being hosed by upgrades. Until then, beware.
You might also be interested in:
- Using Gmail or Google Apps email with Magento
- New feature for Magento Gmail or Google Apps Email Extension
- 3 easy steps to add products to the Magento Home Page (or any CMS page)
- SMTP Pro Magento extension, free and open SMTP support for Magento
- Removing the Compare function in Magento, the easy way
Tagged as autoresponder, Magento, mailchimp + Categorized as Magento, PHP, Web Development


![Email Me: ashley.schroder[at]gmail Email Me: ashley.schroder[at]gmail](/wp-content/themes/aschroder/images/email.png)














I have been using campaign monitor….got it working but it seems a bit limited…have not tried it yet with 1.4…mainly i am using it because its pay per use…is MChimp way way better?
Tough call on the Campaign monitor vs Mailchimp. I think there is a pay-per-use account for Mailchimp too – I haven’t used Campaign monitor, but do recommend Mailchimp to people. We use it for email marketing for several of the suppliers we represent in the US and have no complaints about the reliability or reporting they offer.(they should send me a t-shirt shouldn’t they…).
I will be adding more autoresponder support for Magento in the future, particularly around soliciting product reviews/order feedback from customers 1-2 weeks after the order ships. Does Campaign monitor offer anything like that?