mailx
Enhanced mail command for sending and receiving Internet mail
TLDR
SYNOPSIS
mailx [options] [recipients]
DESCRIPTION
mailx is an enhanced mail command for sending and receiving Internet mail. It is POSIX-compatible with extensions for MIME support, SMTP connectivity, S/MIME, attachments, and more features than basic mail.It handles both sending and reading email. When called without arguments, it reads the user's mailbox. When given recipients, it enters compose mode.
PARAMETERS
RECIPIENTS
Email addresses.-s SUBJECT
Email subject.-a FILE
Attach file.-c ADDR
CC recipients.-b ADDR
BCC recipients.-r ADDR
Set From address.-S VAR=VALUE
Set internal variable (e.g., smtp, from, smtp-auth).-t
Read recipients from To/Cc/Bcc headers in the message.-f FILE
Read from mailbox file.-N
Inhibit reading system-wide startup file.-H
Print header summary and exit.--help
Display help information.
CAVEATS
Multiple implementations exist (heirloom-mailx, s-nail, BSD mailx) with differing feature sets. SMTP configuration and attachment syntax varies between implementations. The -a flag means "attach file" in heirloom-mailx/s-nail but "set header" in BSD mailx.
HISTORY
mailx evolved from the original Unix mail command through Berkeley Mail. Modern implementations include s-nail (successor to heirloom-mailx) which adds MIME, SMTP, POP3, and IMAP support.
