mail - send and receive mail

mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr... [-- sendmail-options...]
mail [-iInNv] -f [name]
mail [-iInNv] [-u user]
mail processing system, which has a command with lines replaced by messages.

-i Ignore tty interrupt signals
-I interactive mode when input isn't a terminal. the '~' special character when sending mail is only active in interactive mode.
-n Inhibits reading /etc/mail.rc
-v Verbose , details of delivery are displayed on the terminal.
-N No display of message headers when reading mail or editing a mail folder.
-s subject ; quote subjects containing spaces.
-c carbon copies to list comma-separated list of names.
-bnot bcc blind carbon copies to
 
-f Read in the contents of your mbox (or the specified file) for processing; when you quit, mail writes undeleted messages back to this file.
-u Is equivalent to: mail -f /var/spool/mail/user

Reading mail

with no arguments and checks your mail in the post office, then prints out a one line header of each message found. The current message is initially the first message (numbered 1) and can be printed using the print command (which can be abbreviated 'p'). You can move among the messages much as you move between lines in ed(1), with the commands '+' and '-' moving backwards and forwards, and simple numbers.

Sending mail

mail is invoked with arguments which are the names of people to whom the mail will be sent. type in the message, followed by an 'control-D' at the beginning of a line.

Replying to or originating mail.

Use the reply command to set up a response to a message, sending it back to the person who it was from. Text you then type in, up to an end-of-file, defines the contents of the message. While you are composing a message, mail treats lines beginning with the character ~specially.
m (alone on a line) will place a copy of the current message into the response right shifting it by a tabstop (see indentprefix variable, below). Other escapes will set up subject fields, add and delete recipients to the message and allow you to escape to an editor to revise the message or to a shell to run commands. These options are given in the summary .

Disposing of mail.

Delete 'd') the message or reply 'r') to it. This is reversible; the message can be undeleted 'u') by giving its number, or the mail session can be aborted by with the exit 'x') command.

Specifying messages

Commands such as print and delete can be given a list of message numbers as arguments to apply to a number of messages at once.