This commit is contained in:
parent
5dae08de63
commit
eaa4c0ca96
2 changed files with 67 additions and 1 deletions
53
README.md
53
README.md
|
@ -10,3 +10,56 @@ with all free accounts in standard mail services.
|
|||
The tool keeps track of failures: a next run
|
||||
with the same config file will process only the failures, so all recipients
|
||||
will eventually be reached.
|
||||
|
||||
## Installation
|
||||
|
||||
`tinysteady-mailer` is provided as:
|
||||
|
||||
* a standard Python package
|
||||
* a container
|
||||
|
||||
See the Packages section on the project's home page: <https://code.philo.ydns.eu/philorg/tinysteady-mailer>.
|
||||
|
||||
## Organisation and workflow
|
||||
|
||||
Create a yaml config file per mail campaign.
|
||||
Some example (for different kind of mail servers) are given in the `configs` directory.
|
||||
|
||||
There are 2 sources of address:
|
||||
|
||||
* embedded in the config file
|
||||
* with an external json file
|
||||
|
||||
Run `tinysteady-mailer` with:
|
||||
|
||||
```~~
|
||||
CONFIG=configs/my-first-campaign.yaml tinysteady-mailer
|
||||
```
|
||||
|
||||
For example, given the local.yaml config file:
|
||||
|
||||
```sh
|
||||
CONFIG=configs/local.yaml tinysteady-mailer
|
||||
INFO - Using configs/local.yaml
|
||||
INFO - Mail sent to root@localhost.localdomain
|
||||
INFO - 1 mails sent successfully
|
||||
```
|
||||
|
||||
A `results/<config_name>` directory is created, with 2 files named
|
||||
with a timestamp: a `.success` and a `.err` files.
|
||||
|
||||
If some mails could not be delivered, the `.err` file contains
|
||||
records (in json format) of the failures.
|
||||
|
||||
A subsequent run with the same config will process only those.
|
||||
(that this can be overridden in the config file).
|
||||
|
||||
For example:
|
||||
|
||||
```sh
|
||||
CONFIG=configs/local.yaml tinysteady-mailer
|
||||
INFO - Using configs/local.yaml
|
||||
INFO - Using a file with 1 failed attempts for this config (/home/phil/dev/tinysteady-mailer/results/local/2024-12-12 03:24:38.err)
|
||||
INFO - Mail sent to root@localhost.localdomain
|
||||
INFO - 1 mails sent successfully
|
||||
```
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
[project]
|
||||
name = "tinysteady-mailer"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
description = "A tiny and resolute mailer CLI app"
|
||||
readme = "README.md"
|
||||
license = { text = "MIT License" }
|
||||
authors = [{ name = "phil", email = "phil.dev@philome.mooo.com" }]
|
||||
requires-python = ">=3.12"
|
||||
dependencies = [
|
||||
|
@ -11,6 +12,18 @@ dependencies = [
|
|||
"pydantic-settings[yaml]>=2.6.1",
|
||||
"pydantic[email]>=2.10.3",
|
||||
]
|
||||
classifiers = [
|
||||
"Topic :: Communications :: Email",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Development Status :: 3 - Alpha",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://code.philo.ydns.eu/philorg/tinysteady-mailer"
|
||||
Repository = "https://code.philo.ydns.eu/philorg/tinysteady-mailer.git"
|
||||
Issues = "https://code.philo.ydns.eu/philorg/tinysteady-mailer/issues"
|
||||
|
||||
[project.scripts]
|
||||
tinysteady-mailer = "tinysteady_mailer:main"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue