• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

mail

mail

mail Sends and receives mail.
mail [-iInv] [-s <subject>] [-c <cc-addr>] [-b <bcc-addr>] <to-addr>...

mail [-iInNv] -f [<name>]

mail [-iInNv] [-u <user>]

mail

-i Ignores tty interrupt signals. Especially useful for communication on noisy phone lines.
-I Forces interactive mode, even when input isn't a terminal. Particularly useful for using the ~ character, which is only available in interactive mode.
-n Ignores /etc/mail.rc upon startup.
-v Verbose mode.
-s <subject> Specifies the subject. Uses only the first argument after the flag. Be certain to use quotes for any subjects with spaces.
-c <cc-addr> Sends a carbon copy to the users specified in <cc-addr>.
-b <bcc-addr> Sends a blind copy to the users specified in <bcc-addr>. The list should be a comma-separated list.
-f [<name>] Reads the contents of your mbox or the file specified by <name>. When you quit, mail writes undeleted messages back to this file.
-u <user> Equivalent to -f /usr/mail/<user>.
Here are some of the useful options available within mail:
-<n> Displays the previous message, if <n> is not specified; otherwise, displays the <n>th previous message.
? Displays a brief summary of commands.
help Same as ?.
^D Sends the composed message.
!<shell_command> Executes the shell command that follows.
<return>  
n  
+ Goes to the next message in sequence.
Reply  
R Replies to the sender of the message. Does not reply to any other recipients of the message.
reply  
r Replies to the sender and all other recipients of the message.
respond Same as reply.
mail <user>  
m Sends mail to the <user> specified. Takes login names and distribution group names as argument.
delete  
d Takes as its argument a list of messages and marks them to be deleted. Messages marked for deletion are not available for most other commands.
dp  
dt Deletes the current message and prints the next message.
undelete  
u Takes a message list as its argument and unmarks the messages for deletion.
edit  
e Takes as its argument a list of messages and points a text editor at each one in turn.
inc Checks for any new incoming messages that have arrived since the session began and adds those to the message list.
save  
s Takes as its argument a list of messages and a filename and saves the messages to the filename. Each message is appended to the file. If no message is given, saves the current message.
write  
w Similar to save, except saves only the body of messages.
unread  
U Takes as its argument a list of messages and marks them as not read.
alias  
a With no arguments, prints out the list of currently defined aliases. With one argument, prints out the specified alias. With multiple arguments, creates a new alias or edits an old one.
unalias Takes as its argument a list of names defined by alias commands and discards the remembered groups of users.
exit  
ex  
x Exits mail without making any changes to the user's mbox, system mailbox, or the -f file that was being read.
xit Same as exit.
quit  
q Terminates the session, saving all undeleted messages in the user's mbox.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint