|
6 months ago | |
---|---|---|
.gitignore | 6 months ago | |
README.md | 6 months ago | |
mailing.py | 6 months ago | |
test-emailling.footer | 6 months ago | |
test-emailling.html | 6 months ago | |
test-emailling.subject | 6 months ago | |
test-emailling.txt | 6 months ago | |
test-recipients-data | 6 months ago |
Simple mailing script.
Table of content
On a Debian-based host running at least Debian Stretch, you will need the following packages:
Clone repo
$ git clone https://forge.april.org/adminsys/spamotron
$ cd spamotron
$ chmod a+x mailing.py
Try it
$ ./mailing.py --help
$ ./mailing.py -t test-recipients-data -b test-emailling --dry-run --verbose
The « to-file » is expected to be csv with the default
dialect
(delimiter = ,
and char delimiter ="
).
The first line declare columns headers. The from
and to
headers are
expected the be found. Headers are lower cased.
To avoid boring repetition it is possible to declare a default column value
using :
in header. The default value is considered when the column is lacking,
not when the column is empty.
The templates files are expected to be jinja2
templates. The csv
values are accessible using the column name, i.e. one can insert the recipient
address anywhere in template using {{ to }}
.
Don't worry about escaping: HTML templates are auto escaped.
Spamotron is developed by April and licensed under the GPLv2+.