A tool to output .eml files for opening in your email client and (optionally) sending them with SMTP.
Project description
A tool for spitting out .eml files from a template and a CSV file
Built for UNSW tutors, because we don't get to use SMTP with Outlook, since we can't add OAuth applications.
It can also do SMTP for when you have the luxury.
Usage: class-email [OPTIONS] DATAFILE TEMPLATE SUBJECT
Creates .eml files for each row in DATAFILE. The email body is generated
from TEMPLATE, which is a Jinja2 template. Each email's subject will be
SUBJECT. Can optionally be opened in your preferred email program or sent
via SMTP.
Options:
--filter <INTEGER FILENAME>... A column number followed by the name of a
file containing values that that column
needs to match. Values should be separated
by newlines.
--sender TEXT If specified, the From header is added to
.eml files - useful if you have multiple
sending addresses configured in your email
client. If specified in SMTP mode, will
override the sender address (which defaults
to the SMTP username).
--cc TEXT If specified, the CC header is added, to CC
additional email addresses to all emails.
--reply-to TEXT If specified, the Reply-To header is added,
to indicate to receiving email clients where
replies should be directed.
--email-column INTEGER The column to use as the email address.
First column is column 0. Defaults to 0.
--skip-rows INTEGER Number of rows to skip (e.g. headers).
Defaults to 0.
--outdir DIRECTORY A directory where .eml files should be
output to. Defaults to ./out.
--smtp Sends emails via SMTP using the environment
variables `SMTP_HOST`, `SMTP_USER`,
`SMTP_PASS`, `SMTP_PORT`.
--yes Automatically answers 'yes' when prompted to
open files or send emails.
--no Automatically answers 'no' when prompted to
open files or send emails.
--help Show this message and exit.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
class_email-0.1.1.tar.gz
(10.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file class_email-0.1.1.tar.gz.
File metadata
- Download URL: class_email-0.1.1.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
675fc6334ca2bd7953d6cb0410f15bef599f27af2648d771b423f7d2d1422ac7
|
|
| MD5 |
e8d6f59c4e31a15a9a0c86e706489471
|
|
| BLAKE2b-256 |
f56078ed66588bc01f09d884dba8c7ee00cbe30c50035b7345d8f976e41daa76
|
File details
Details for the file class_email-0.1.1-py3-none-any.whl.
File metadata
- Download URL: class_email-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e62f6e455f7d14fd477d3aa8a0997f5d79a29aa77d47c1b62d6d39472839f365
|
|
| MD5 |
6ac172d8c65d7e50f9fc37c99aeb040c
|
|
| BLAKE2b-256 |
2af7ebae28aa533e3a575e0fc70e89445cf389c36c93b1146f0e5622e7384f5b
|