Last active
December 25, 2015 06:19
-
-
Save makmac213/6931754 to your computer and use it in GitHub Desktop.
Mailchimp subscribe to list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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