Sending Mail
$ mail user@host.domain Subject: HI
After you enter the subject, you can hit return, then type in the words and sentences of your message. You can use the following mail composing commands, also.
Command (starts in column 1) | Purpose |
---|---|
. | (period) end your mail message; if this doesn't work hold down the Control and D keys at the same time. |
~p | display the entire contents of your message |
~r filename.txt | read in the contents of the file named filename.txt into the mail message |
~vi | enter a vi editor session on the mail message so that you can edit it using vi; when you exit vi, you'll be back in mail program |
Reading Mail
Command | Purpose |
---|---|
? | list all mail commands available; if this doesn't work, enter help |
n | (n is a number) display message number n |
d | delete the current message |
x | exit, but don't preserve any deletions |
q | exit, preserving any deletions |
h | list all mail messages and header information |
s filename.txt | save the current message into a file named filename.txt |
For more Web-based instruction on Unix mail, see "UNIX Support--Generic Mail," from the Computer Help Desk, University of Victoria, Victoria, British Columbia, Canada.