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 | CSS theme (see below) |
subscribe uses Pico CSS v2 and supports themes from pico-themes.
The --theme option (or :theme in config) accepts:
- A pico-themes name (e.g.
ashes,doric,swh) - An
https://URL to a remote CSS file - A
file:///URL to a local CSS file - A local
.cssfile path
subscribe -t doric
subscribe -t https://example.com/my-theme.css
subscribe -t /path/to/theme.cssYou can also set it in a configuration file:
{:theme "ashes"}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:
This project uses Intentional Versioning, here are the three audiences:
Users: developers who deploysubscribeIntegrators: external packagersMaintainers: maintainers of the codebase
- Send a bug report with
[BUG] topics: <SHORT EXPLICIT BUG DESCRIPTION> - Send a patch with
[PATCH] topics: <COMMIT SUMMARY> - Send a feature request with
[FR] topics: <FEATURE REQUEST> - Share any other question or idea
You can also send me an email and support my work on liberapay.
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.
