sends and reads email
TLDR
Send email
$ mail -s "[Subject]" [recipient@example.com]
Send with body$ echo "[message]" | mail -s "[Subject]" [recipient@example.com]
Send file contents$ mail -s "[Subject]" [recipient@example.com] < [message.txt]
Send with attachment$ mail -s "[Subject]" -A [file.pdf] [recipient@example.com]
Read mail$ mail
Check specific mailbox$ mail -f [/var/mail/user]
SYNOPSIS
mail [options] [recipients]
DESCRIPTION
mail sends and reads email. It's a basic command-line mail user agent.
The tool can send quick emails from scripts. It reads mail from local mailboxes.
PARAMETERS
RECIPIENTS
Email addresses.-s SUBJECT
Email subject.-A FILE
Attach file.-c ADDR
CC recipients.-b ADDR
BCC recipients.-f FILE
Read from mailbox.--help
Display help information.
CAVEATS
Requires MTA configured. Various implementations. May need mailutils package.
HISTORY
mail dates back to early Unix systems, providing basic email functionality for users and scripts.

