ODK Mailer
A simple CLI to send Mails for ODK.
Built with Typer and packaged with Poetry.
Requirements
Setup
Install the cli via pip
pip install odk-mailer
Configuration example
Config location: ~/.env
:
SMTP_HOST=smtp.freesmtpservers.com
SMTP_PORT=25
SMTP_USER=
SMTP_PASS=
CRON_FREQUENCY=15
NOTIFY_TO=foo@bar.com,faz@baz.com
NOTIFY_FROM=odk-mailer@freesmtpservers.com
ODK_HOST=https://your.odk-central.host.tld
Usage
Create and run a new mail job
odk-mailer jobs create
odk-mailer jobs run <job-id>
odk-mailer jobs delete <job-id>
List mail jobs and evaluate them
odk-mailer jobs list
odk-mailer jobs evaluate
Initiate crontab to periodically evaluate mailjobs and run them directly after
odk-mailer cron init
Development
Building a Package - Guide: https://typer.tiangolo.com/tutorial/package/#create-your-app
Requirements
poetry shell
poetry install
poetry run odk-mailer
Push to PyPi
poetry build
poetry publish
# requires credentials to be setup: poetry config pypi-token.pypi <my-token>