mail (Unix)

From Wikipedia, the free encyclopedia
Jump to: navigation, search

mail is a command line email client for Unix and Unix-like operating systems.

Example usage[edit]

mail -s "You've got mail" -c

This sends a message with the subject "You've got mail" to two recipients, and, and CCs (copies) a third, The message will be typed after the command is entered and will be ended with Control-D.

Any Unix command sequence that generates text can be used to send a message in one line. For example:

echo "Some message" | mail -s "meeting today"

This is especially useful for having a system report its status automatically through email.

See also[edit]

External links[edit]