Web application to manage Mailgun mailing list subscriptions.
Assuming bbin is installed:
bbin install io.github.bzg/subscribeThen run:
subscribe
# Then check http://localhost:8080You need to set at least the Mailgun variables:
export MAILGUN_API_KEY="xxxxxxxxxxxxxxxx-xxxxxxxx-xxxxxxxx"
export MAILGUN_API_ENDPOINT="https://api.eu.mailgun.net/v3"
export MAILGUN_LIST_ID="my@list.com"
export MAILGUN_LIST_NAME="My Newsletter"For double opt-in email sending:
export SUBSCRIBE_SMTP_HOST="smtp.example.com"
export SUBSCRIBE_SMTP_PORT="587"
export SUBSCRIBE_SMTP_USER="user@example.com"
export SUBSCRIBE_SMTP_PASS="yourpassword"
export SUBSCRIBE_SMTP_FROM="newsletter@example.com"
export SUBSCRIBE_BASE_URL="http://localhost"You can also set a base path for subdirectory deployments:
export SUBSCRIBE_BASE_PATH="/newsletter"| Option | Alias | Description |
|---|---|---|
--help | -h | Display help |
--port | -p | Port number (default: 8080) |
--base-path | -b | Base path for subdirectory deployments |
--base-url | -u | Base URL for confirmation links (no port) |
--log-level | -l | Log level: debug, info, warn, error |
--log-file | -L | Log file path |
--config | -c | EDN configuration file path |
--index-tpl | -I | Custom index HTML template file |
--theme | -t | Pico CSS theme (see below) |
subscribe uses Pico CSS v2 and supports themes from
pico-themes:
| Theme | Description |
|---|---|
doric | Monochromatic, minimal |
dsfr | French gov design |
lincoln | Warm serif |
org | Org-mode inspired |
swh | Software Heritage |
teletype | Monospace, retro |
subscribe -t doricYou can also set it in a configuration file:
{:theme "swh"}You can use an EDN file to set or override any option:
subscribe -c config.ednThe configuration file supports these keys: ui-strings,
mailgun-api-endpoint, mailgun-api-key, mailgun-list-id,
mailgun-list-name, base-url, base-path, subscribe-smtp-host,
subscribe-smtp-port, subscribe-smtp-user, subscribe-smtp-pass,
subscribe-smtp-from, index-tpl, theme.
To get or provide feedback, send an email to bzg@bzg.fr.
subscribe is written as a Clojure Babashka script and we recommend
installing it with bbin. Install everything:
brew install babashka/brew/bbinFor detailed installation instructions:
If you like Clojure(script), you can support the ecosystem by making a donation to clojuriststogether.org.
The code in this repository is licensed under EPL-2.0.
