mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
2.3 KiB
2.3 KiB
TL;DR
# Just test the presence for new emails.
# Exit status '0' means there are, '1' there is none.
mail -e
# Read all unread emails at once.
cat '/var/mail/username'
# Read automatically saved messages.
cat "$HOME/mbox"
# Send emails.
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 before sending it.
uuencode 'file.txt' | mail -s 'Subject' 'recipient@mail.server'
# Delete all emails at once.
echo -n > '/var/mail/username'
sudo rm '/var/mail/username'
| Command | Description |
|---|---|
? |
View the help |
p, printp 3p 3 6p 3-10p * |
Print all messages in the list to the default output |
t, type |
Synonym for p |
mo, moremo 3mo 3 6mo 3-10mo * |
Print all messages in the list to the default pager |
n, nextn 3n 3 6n 3-10n * |
Print the next message in the list |
d, deleted 3d 3 6d 3-10d * |
Mark all messages in the list as deleted |
q, quit |
Quit saving unresolved messages under ~/mbox |
x, ex, exit |
Quit without making changes to the mailbox |