mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
23 lines
544 B
Markdown
23 lines
544 B
Markdown
# Send an email from CLI
|
|
|
|
## TL;DR
|
|
|
|
```sh
|
|
mail -s "Subject" recipient@mail.server
|
|
echo "" | mail -a attachment.file -s "Subject" recipient@mail.server
|
|
|
|
# send larger files
|
|
cat file.txt | mail -s "Subject" recipient@mail.server
|
|
|
|
# make "email-safe" the contents of a file
|
|
uuencode file.txt | mail -s "Subject" recipient@mail.server
|
|
```
|
|
|
|
## Further readings
|
|
|
|
- [linux mail command examples]
|
|
- [uuencode]
|
|
|
|
[linux mail command examples]: https://www.binarytides.com/linux-mail-command-examples
|
|
[uuencode]: https://linux.101hacks.com/unix/uuencode/
|