listsend-0.3.2 is not a library.
listsend 0.3.2
Send emails to CSV list from template on CLI
- License: MIT/Apache-2.0
- Authors: github.com/pepa65 pepa65@passchier.net, Ahmad Saugi saugi.dev@gmail.com
- Repo: https:/github.com/pepa65/listsend
- After: https://github.com/zuramai/emsend
Install static single-binary
wget https://github.com/pepa65/listsend/releases/download/0.3.2/listsend
sudo mv listsend /usr/local/bin
sudo chown root:root /usr/local/bin/listsend
sudo chmod +x /usr/local/bin/listsend
Install with cargo
If not installed yet, install a Rust toolchain, see https://www.rust-lang.org/tools/install
Direct from crates.io
cargo install listsend
Direct from repo
cargo install --git https://github.com/pepa65/listsend
Static build (avoiding GLIBC incompatibilities)
git clone https://github.com/pepa65/listsend
cd listsend
rustup target add x86_64-unknown-linux-musl
cargo rel # Alias defined in .cargo/config.toml
The binary will be at target/x86_64-unknown-linux-musl/release/listsend
Usage
listsend 0.3.2 - Send emails to CSV list from template on CLI
Usage: listsend [OPTIONS]
Options:
-c, --csv <CSV> CSV file (name,email,data) [default: ./list.csv]
-t, --template <TEMPLATE> Email template file [default: ./email.tpl]
-s, --smtp <SMTP> SMTP config file [default: ./smtp.env]
-e, --email <EMAIL> Email config file [default: ./email.env]
-r, --readme Output readme file from repo
-h, --help Print help
-V, --version Print version
The whole configuration goes through environment variables that can be set
independently or in the files smtp.env and email.env, and through the
email template email.tpl and the recipients list list.csv.
Copy the files in example to your working directory:
- Edit the
smtp.envfile with the data and credentials for the SMTP relay:SENDLIST_HOST,SENDLIST_PORT(default: 465),SENDLIST_USER,SENDLIST_PASSWORD,SENDLIST_FROM. - Edit
email.envwith the data for the email:SENDLIST_SUBJECT,SENDLIST_HTML(default: unset),SENDLIST_DELAY(default: 1 second). - All fields above will be overridden by any corresponding environment variable
that can be set like:
export SENDLIST_DELAY=0. - Edit
email.tplto the desired content, the fields{{name}},{{email}}and{{data}}can be used in the template file. The template can be plain text (default) or html: setSENDLIST_HTMLto something. - Edit
list.csvfor the recipient's data, where the column header isname,email,dataand following lines specify each recipient. The fieldsnameandemailare mandatory,datais optional. - Any of the above files can be set on the commandline as well to override the default name & path.