This project is no longer maintained.
MailChimp subscription request handler, built with Scotty. Intended to support custom signup forms.
Listens for HTTP POST
requests at /subscribe
. All requests are forwarded to the MailChimp /lists/subscribe
endpoint.
Query parameter | Description |
---|---|
name |
Subscriber name. Required. |
email_address |
Subscriber email address. Required. |
list_id |
Mailing list identifier. Required, unless MAILCHIMP_LIST_ID is set. |
email_type |
Either html or text . |
double_optin |
Send a double opt-in confirmation message. |
update_existing |
Accept already existing email addresses. |
send_welcome |
If double opt-in is off, send the list welcome message. |
Authentication credentials and defaults can be configured by setting environment variables.
Environment variable | Description |
---|---|
MAILCHIMP_API_KEY |
Authentication token. Required. |
MAILCHIMP_LIST_ID |
Default for list_id . |
MAILCHIMP_EMAIL_TYPE |
Default for email_type . |
MAILCHIMP_DOUBLE_OPTIN |
Default for double_optin . |
MAILCHIMP_UPDATE_EXISTING |
Default for update_existing . |
MAILCHIMP_SEND_WELCOME |
Default for send_welcome . |
PORT |
HTTP listening port. Defaults to 8080 . |
Installs in seconds on most Linux and OS X machines, using Halcyon.
$ halcyon install https://github.com/mietek/mailchimp-subscribe
$ export MAILCHIMP_API_KEY=…
$ mailchimp-subscribe
Ready to deploy in one click to the Heroku web application platform, using Haskell on Heroku.
Clicking the button is equivalent to executing the following commands:
$ git clone https://github.com/mietek/mailchimp-subscribe
$ cd mailchimp-subscribe
$ heroku create -b https://github.com/mietek/haskell-on-heroku
$ heroku config:set MAILCHIMP_API_KEY=…
$ git push heroku master
$ heroku ps:scale web=1
$ heroku open
Made by Miëtek Bak. Published under the BSD license.