https://github.com/robinboers/sendmail
Program to send emails from the CLI.
https://github.com/robinboers/sendmail
cli mail rust
Last synced: 10 months ago
JSON representation
Program to send emails from the CLI.
- Host: GitHub
- URL: https://github.com/robinboers/sendmail
- Owner: RobinBoers
- Created: 2024-04-01T15:36:27.000Z (about 2 years ago)
- Default Branch: trunk
- Last Pushed: 2025-04-25T22:30:11.000Z (about 1 year ago)
- Last Synced: 2025-05-20T03:12:08.459Z (about 1 year ago)
- Topics: cli, mail, rust
- Language: Rust
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sendmail
This is a CLI wrapper for the amazing [`lettre`](https://lettre.rs) crate. It allows you to easiliy send email without leaving the comfort of your shell.
## Configuration
`sendmail` expects a configuration file for each account in the TOML format, located in `$XDG_CONFIG_HOME/sendmail` (defaults to `.config/sendmail`). Here's an example configuration:
```toml
# .config/sendmail/school
name = "Robin Boers"
email = "4410@schravenlant.nl"
[smtp]
hostname = "smtp.gmail.com"
port = 587
username = "4410@schravenlant.nl"
```
The password is passed via the CLI, because I'm not comfortable with having credentials in plain text on my computer.
## Usage
With the configuration from above:
```shell
sendmail school hello-world.md \
--subject "Hello World!" \
--to "hor@schravenlant.nl" \
--to "you@example.com" \
--password "$(pass mail/school)" \
--attach assignment.pdf
```