1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-06 13:35:24 +02:00
tldr/pages/common/mail.md
Managor 4b1e0196d1
common/*: reduce usage of "command-line" (part 3) (#16951)
Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Wiktor Perskawiec <wiktor@perskawiec.cc>
2025-06-28 13:12:44 +00:00

25 lines
860 B
Markdown

# mail
> Operate on the user's mailbox.
> To send an email the message body is built from `stdin`.
> More information: <https://manned.org/mail>.
- Open an interactive prompt to check personal mail:
`mail`
- Send a typed email message with optional CC. The command-line below continues after pressing `<Enter>`. Input message text (can be multiline). Press `<Ctrl d>` to complete the message text:
`mail --subject "{{subject line}}" {{to_user@example.com}} --cc "{{cc_email_address}}"`
- Send an email that contains file content:
`mail --subject "{{$HOSTNAME filename.txt}}" {{to_user@example.com}} < {{path/to/filename.txt}}`
- Send a `tar.gz` file as an attachment:
`tar cvzf - {{path/to/directory1 path/to/directory2}} | uuencode {{data.tar.gz}} | mail --subject "{{subject_line}}" {{to_user@example.com}}`
- Display help:
`mail {{[-h|--help]}}`