mail Linux Commands
What is Linux mail Command?
Explanation
mail COMMAND:mail command is used to send and receive mails locally and globally.
SYNTAX :
mail
OPTIONS:
-s |
Specify subject on command line. |
-c |
Send carbon copies to list of users. |
-b |
Send blind carbon copies to list. List should be a comma-separated list of names. |
-f |
Read in the contents of your mbox for processing; when you quit, mail writes undeleted messages back to this file. |
-i |
Ignore tty interrupt signals. This is particularly useful when using mail on noisy phone lines. |
EXAMPLE:
-
Receive mails
mail
The above command display the messages. Press Enter to view the next message after '&' symbol.
-
Sent mails
mail abc@localhost.com (or) mail abc@hiox.com
Starts a new mail and sent to abc@localhost.com.
To terminate the message, type a period(.) and press Enter (or)
press ctrl+d and press Enter.