Skip to content
/ subscribe Public

Web application to list and subscribe to #mailgun #mailjet and #sendinblue mailing/contact lists

License

Notifications You must be signed in to change notification settings

bzg/subscribe

Repository files navigation

Subscribe

What it does?

If you manage mailing lists through mailgun.com or mailjet.com, Subscribe creates webpages for users to (un)subscribe (from)to your mailing lists.

subscribe.png

Features

  • Filter displayed mailing lists
  • Receive an email very x subscription
  • Custom HTML body header and footer
  • Use your own stylesheet based on bulma.io

Configure

Set up environment variables

Application variables:

export SUBSCRIBE_SMTP_LOGIN="postmaster@xxx"
export SUBSCRIBE_SMTP_PASSWORD="your-password"
export SUBSCRIBE_SMTP_PORT=587
export SUBSCRIBE_PORT=3000
export SUBSCRIBE_BASEURL="http://yourdomain.com"

Backend-specific variables:

export MAILGUN_API_KEY="your-key"
export MAILGUN_API_SECRET="your-password"
export MAILJET_API_KEY="your-key"
export MAILJET_API_SECRET="your-password"

Define (mandatory) options in config.edn

Copy config_example.edn to config.edn and edit it.

The mandatory configuration options are :admin-email :base-url and :backends.

Test

Run lein test to test the configuration before running the application.

~$ git clone https://github.com/bzg/subscribe
~$ cd subscribe/
... [Set up your environment variables and config.edn]
~$ lein test

Run

With docker

Assuming your environments variables are stored in ~~/.subscribe_envs~ and you want to expose the 3000 port:

~$ git clone https://github.com/bzg/subscribe
~$ cd subscribe/
~$ docker build -t subscribe .
~$ docker run -it -p 3000:3000 --env-file=~/.subscribe_envs subscribe

Then go to http://localhost:3000.

With lein run

~$ git clone https://github.com/bzg/subscribe
~$ cd subscribe/
... [Set up your configuration]
~$ lein run

Then go to http://localhost:3000 or to your custom base URL.

With java -jar

~$ git clone https://github.com/bzg/subscribe
~$ cd subscribe/
... [Set up your configuration]
~$ lein uberjar
~$ java -jar target/subscribe-x.x.x-standalone.jar

TODOs

  • [ ] Catch errors before redirecting to the confirmation pages

Support the Clojure ecosystem

If you like Clojure(script), please consider supporting maintainers by donating to clojuriststogether.org.

License

subscribe is licensed under the Eclipse Public License 2.0.

About

Web application to list and subscribe to #mailgun #mailjet and #sendinblue mailing/contact lists

Resources

License

Stars

Watchers

Forks