Skip to content

bzg/subscribe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Subscribe

Web application to manage Mailgun mailing list subscriptions.

Install and run

Assuming bbin is installed:

bbin install io.github.bzg/subscribe

Then run:

subscribe
# Then check http://localhost:8080

Configuration

Environment variables

You 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"

Command line options

OptionAliasDescription
--help-hDisplay help
--port-pPort number (default: 8080)
--base-path-bBase path for subdirectory deployments
--base-url-uBase URL for confirmation links (no port)
--log-level-lLog level: debug, info, warn, error
--log-file-LLog file path
--config-cEDN configuration file path
--index-tpl-ICustom index HTML template file
--theme-tPico CSS theme (see below)

Themes

subscribe uses Pico CSS v2 and supports themes from pico-themes:

ThemeDescription
doricMonochromatic, minimal
dsfrFrench gov design
lincolnWarm serif
orgOrg-mode inspired
swhSoftware Heritage
teletypeMonospace, retro
subscribe -t doric

You can also set it in a configuration file:

{:theme "swh"}

Configuration file

You can use an EDN file to set or override any option:

subscribe -c config.edn

The 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.

Feedback

To get or provide feedback, send an email to bzg@bzg.fr.

Requirements

subscribe is written as a Clojure Babashka script and we recommend installing it with bbin. Install everything:

brew install babashka/brew/bbin

For detailed installation instructions:

Support the Clojure(script) ecosystem

If you like Clojure(script), you can support the ecosystem by making a donation to clojuriststogether.org.

License

The code in this repository is licensed under EPL-2.0.

About

Simple web app to manage Mailgun mailing lists subscriptions

Resources

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors