Skip to content

Instantly share code, notes, and snippets.

@makmac213
Last active December 25, 2015 06:19
Show Gist options
  • Save makmac213/6931754 to your computer and use it in GitHub Desktop.
Save makmac213/6931754 to your computer and use it in GitHub Desktop.
Mailchimp subscribe to list
# MAILSNAKE
from mailsnake import MailSnake
from mailsnake.exceptions import *
from django.conf import settings
ms = MailSnake(settings.MAILCHIMP_API_KEY)
val = ms.listSubscribe(id=settings.MAILCHIMP_LIST_ID,
email_address=email_address,
double_optin=False,
update_existing=True,)
# settings.py
# MAILCHIMP
MAILCHIMP_API_KEY = '1fc9bd680946d73c5781ad723d81c8d0-us7'
MAILCHIMP_LIST_ID = '35daa5e8d2'
# requirements.txt
mailsnake==1.6.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment