Skip to content
Web app to subscribe to mailgun mailing lists
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
resources
src/subscribe
test/subscribe
.gitignore
Dockerfile
LICENSE
README.org
project.clj
subscribe.png

README.org

Subscribe

What it does?

If you manage mailing lists through mailgun.com, Subscribe lets you create webpages from where users can (un)subscribe (from)to your mailing lists.

subscribe.png

Features

  • Filter displayed mailing list
  • Receive an email very x subscription
  • Use your own stylesheet based on bulma.io

Configure

Setup environment variables

Add this to your ./profile file:

export MAILGUN_API_KEY="your-key"
export MAILGUN_LOGIN="postmaster@xxx"
export MAILGUN_PASSWORD="your-password"
export SUBSCRIBE_PORT=3000
export SUBSCRIBE_BASEURL="http://yourdomain.com"

Optionally define more options in resources/config.edn

{:from                     "your_from_address"
 :locale                   "en-GB" ; or "fr-FR" etc.
 :admin-email              "your@email.com"
 :return-url               "https://yoursite.com"
 :team                     "Your team name"
 :tos-url                  "https://yoursite.com/tos"
 :port                     3000 ; an integer
 :db-uri                   ""   ; local database
 :css                      ""   ; local stylesheet
 :log-file                 ""   ; log file name
 :lists-exclude-regexp     nil  ; regexp
 :lists-include-regexp     nil  ; regexp
 :warn-every-x-subscribers 10   ; an integer}

Test

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

~$ git clone https://github.com/etalab/subscribe
~$ cd subscribe/
... [Setup your configuration]
~$ 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/etalab/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/etalab/subscribe
~$ cd subscribe/
... [Setup your configuration]
~$ lein run

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

With java -jar

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

TODOs

  • [ ] Catch errors before redirecting to the confirmation pages
  • [ ] Connect to other services than mailgun

Support the Clojure ecosystem

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

License

subscribe is licensed under the Eclipse Public License 2.0.

You can’t perform that action at this time.