BSD General Commands Manual
mail, mailx, Mail — send and receive mail
mail [ −dEIinv] [ −a header] [ −b bcc-addr] [ −c cc-addr] [ −s subject] to-addr
... [ −− sendmail-options ...]
mail [ −dEIiNnv] −f [file]
mail [ −dEIiNnv] [ −u user]
mail is an intelligent mail processing system which has a command syntax reminiscent of ed(1) with lines
replaced by messages.
The options are as follows:
Specify additional header fields on the command line such as "X-Loop: foo@bar" etc. You hav e to
use quotes if the string contains spaces. This argument may be specified more than once, the head-
ers will then be concatenated.
Send blind carbon copies to bcc-addr.
Send carbon copies to list of users. cc-addr should be a comma separated list of names.
Causes mail to output all sorts of information useful for debugging mail.
Don’t send messages with an empty body.
Read in the contents of your mailbox (or the specified file) for processing; when you quit, mail
writes undeleted messages back to this file.
Forces mail to run in interactive mode, even when input is not a terminal. In particular, the special
˜ command character, used when sending mail, is only available interactively.
Ignore tty interrupt signals. This is particularly useful when using mail on noisy phone lines.
Inhibits initial display of message headers when reading mail or editing a mail folder.
Inhibits reading /etc/mail.rc upon startup.
Specify subject on command line (only the first argument after the −s flag is used as a subject; be
careful to quote subjects containing spaces).
$ mail -f /var/mail/user
except that locking is done.
Verbose mode. The details of delivery are displayed on the user’s terminal.
At startup time, mail will execute commands in the system command file, /etc/mail.rc, unless explic-
itly told not to by using the −n option. Next, the commands in the user’s personal command file
˜/.mailrc are ex