Integrate MailChimp with your Django App
*** Updated. For some reason, greatape has disappeared. I’ve updated this post to use MailSnake ***
Here’s a quick & easy method for integrating MailChimp into your next Django application.
1. Sign up for MailChimp <– this is an affiliate link. Sign up is free, but if you decide to upgrade to a paid account you will get a $30 credit by using this link.
2. Install MailSnake
sudo pip install -e git://github.com/bradwhittington/mailsnake.git#egg=mailsnake
3. Create a MailChimp API key by going to Account -> API Keys & Info
4. Use the MailChimp API for your emailing needs! Here is some example code to add a subscriber to your default list:
from mailsnake import MailSnake
ms = MailSnake('yourlongapikey-us1')
lists = ms.lists()
ms.listSubscribe(
id = lists['data'][0]['id'],
email_address = 'user@sample.com',
merge_vars = {
'FNAME': 'John',
'LNAME': 'Doe',
},
update_existing = True,
double_optin = False,
)
Find more information and to see available API calls, check out the MailChimp API documentation.
Why use MailChimp? You certainly don’t need to. You can roll your own email system in Django. But I highly recommend checking them out to make use of their awesome tools. They make it easy to set up templates, campaigns, auto-responders, etc. Plus, you can track statistics on the emails you send.
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.
June 21, 2010
·
Dustin ·
12 Comments
Tags: django, mailchimp · Posted in: Programming & Internet
-
http://github.com/ojii/django-mailchimp Jonas Obrist
-
http://www.petersanchez.com/ Peter
-
http://www.brainhood.net/ Jack Broadway
-
http://www.socoreenergy.com/ Randy
-
http://www.cxoclub.com/ Micheal Turner
-
http://www.wiglingtonandwenks.com creative entrepreneur
-
Sam@Denver limo
-
http://www.transportationdenverairport.com Anderson@Denver Airport Limo
-
http://www.matthew-oconnor.com Copywriter
-
http://cribmattresshelp.com JohnD@Crib Mattress
-
http://www.google.com krank


