To see at a glance how mailx works, you can begin by sending yourself a sample message. At the prompt, give the mailx command again, but this time include your address (your login name plus your machine name). For example, if your login was rose and your machine name was texas, your address would be rose@texas. (The @ symbol is read as “at.”) You might be able to use just your login on a local network—consult your system administrator when in doubt.
$ mailx rose@texas |
The program responds with a Subject: line:
$ mailx rose@texas Subject: |
If you like, type a word or two here about the content of the message you're sending yourself and press Return. Now type the body of the message. Use short lines and press Return at the end of each line. Note that you can only make corrections as you go by moving back a space and retyping lines before you press Return.
Your sample message might look something like this (the spaces between lines are made by pressing Return twice):
$ mailx rose@texas Subject: to someone who really cares Dear Rosey, From the ends of your fingers To the tip of your nose You're a cool breeze in August My sweet Texas Rose. See you soon, Rose |
To send your sample message, press Return to complete the last line of the message and then press Ctrl-D. After your message has been sent, the system returns a command prompt.