Mail

From Wiki
Jump to navigation Jump to search

Sending mail

To send a message:

mail [-s <subject>] <address> [< <file>]

or

echo -n "here is my message" | mail [-s <subject>] <address>

To send the contents of a file as an email message,

mail -s "Test" sccmarti@indiana.edu < test_file.txt

Reading mail

To read mail: Type "mail" at the command line. You will see a list of available messages. Type a number to read a particular message, or type return to view them in sequence.

  • To see a list of all messages, type "f *"
  • To delete message number 2: "d 2"
  • Type "exit" to leave without saving changes.
  • Type "q" to quit, saving changes.