If you have only command-line access to your mail, you will probably want to use mail or mutt.
The mail command is the most basic mail client of all and is used to send mail and receive it using the command line. If you want to send mail with the mail command, just enter mail and the person you want to send mail to:
bible:~ # mail [email protected] Subject: Hello there This is a test
Here, we have been asked for the subject of the mail, and we are then ready to type our mail message. Notice that at no point during this transaction are we given guidance on what to do. These are stereotypical Unix commands at their best!
When the message has been entered, you then need to enter a period on a line by itself and then press Enter/Return. This will send the mail to the recipient specified.
To read mail with the mail command, enter mail at the command line and press Enter/Return.
You are then presented with a list of mail in your mailbox that you can read. To read a message, just enter the number of the mail you want to read:
bible:~ # mail mailx version nail 10.6 11/15/03. Type ? for help.
>N 1 [email protected] Thu Sep 30 11:30 14/452
"Hello there" &
Pressing 1 and Return will show you the mail message you just sent.
mail is installed by default on most Unix systems and can be used as a last resort to read your mail. It is also good because you can use the mail command to send mail through a shell script if you have a list of e-mail addresses you need to send something to (but not for spam).
mutt mutt is a more feature-filled command-line mail client that can display your mail in a formatted list and also employs mail message threading. It is a lot more interactive than mail, but can be used on the command line as your daily mail client. If you want to use mutt, install it through the YaST package manager.
Was this article helpful?