Minimailer
Minimailer is a small script to send automated emails.
It's feeded from a template file and from a CSV data file, sending one email per CSV row after applying substitutions according to template rules that matches the data columns.
Dependencies
Minimailer has minimal dependencies:
It was successfully tested in Debian but should run in other systems without problems.
Installation
Minimailer can live anywhere in your $PATH or run directly from the repository.
You can also install Minimailer from PyPI using
pip install minimailer
Basic usage
Minimailer only needs two parameters, the template and the data filenames:
minimailer message.tmpl data.csv
CSV file format
- Minimailer uses the first row in the CSV file as field names.
- All other rows are considered as data.
- There are no constraints about which or how many fields can be used.
- The only requirement is that one of those fields should be used as the email address source.
- By default, the field named
emailis used for email addresses, and can be overriden by the--recipient-field-addressoption.
Template file format
Minimailer relies in Python 3's str.format() syntax, meaning that any text file can be used as long as:
- Template variables are enclosed in curly braces like
{this}. - It implements a valid email message, i.e, it's compatible if the format specified by RFC 2822.
Advanced usage
Minimailer also comes with optional parameters allowing things such as handling
email addresses in a custom contact field as indicated above:
minimailer message.tmpl data.csv --recipient-field-address 'contact'
Or using a custom sendmail invocation (in this case, msmtp with the account
name my-account):
minimailer message.tmpl data.csv --sendmail-command 'msmtp -a my-account'
Check minimailer --help for details and more invocation options.
Examples
Check the following files for examples in how to structure your template file and data source:
Metadata
Release files for minimailer 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| minimailer-0.0.3.tar.gz | 16.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| minimailer-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.0 kB
Release files / minimailer-0.0.3.tar.gz
| Download URL | minimailer-0.0.3.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c80f779c3270f0e342685b2eab0dc2dd5d0b9b2dc9fdd53f9beacd912e7d58b8
|
|
BLAKE2b-256 checksum How to use checksums |
2607118cc7a5e0f659935b750345185e7ea4e25197af5f2675580518450ec82c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2
|
Release files / minimailer-0.0.3-py3-none-any.whl
| Download URL | minimailer-0.0.3-py3-none-any.whl |
|---|---|
| Size | 17.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49bfaa559bb749e293c18c86da8349545107ac8a5ef39d34ac7686f4c491d4b8
|
|
BLAKE2b-256 checksum How to use checksums |
d1b1b5dbea3182d7e9c10a33573410eeb455935061cc55b3804ebf41e9b3d230
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2
|
Security for minimailer 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.