-->
Previous | Table of Contents | Next |
You can send e-mail to an individual, a group of individuals, or a mailing list. Just as when you want to send a paper letter, you must specify the address of the recipient with e-mail. Sometimes, youll compose or write a message while youre sending e-mail; at other times, youll send a prepared message; you may even send the output of a command or program with e-mail. When using mail or elm, the message you send has to be a text filethat is, an ASCII file.
NOTE: The Simple Mail Transport Protocol (SMTP) is used to transfer mail between computers. It now supports only ASCII files. To send a binary file via e-mail, you have to convert the file to ASCII by using the uuencode utility.
Regardless of how the message is prepared, you send mail by using a command of the following form:
mail address
This command starts the mail system. You can then compose the mail message and send it to the specified address. In this syntax, address is the e-mail address of the person who is to receive the message. An address can have several different forms. To send e-mail to someone who has a login ID on the machine youre using, use the login ID of that person. For example, to send e-mail to someone on your system whose login name is george, enter the following command:
mail george
If george is on another system that you can access through some network or collection of networks, you must include the name by which that system is known on the network. Suppose that george is the name of a user on a computer system whose network name is apples.startup.com. You can send e-mail by entering this command:
mail [email protected]
The exact form of the address depends on the type of network being used and any local conventions or rules. Ask a local expert or your system administrator about the form of addresses on a network in your company.
To send the same message to several users, include each of their addresses on the line with the mail command, as in this example:
mail fred bill [email protected]
Many users compose or write messages while theyre in the e-mail program, rather than compose a message beforehand. This is usually the quickestbut not the neatestway to send mail. Its not neat because you have limited editing capabilities while composing your message. Generally, you can deal with only one line at a time. First, you type the command to send e-mail, specify the address(es), and then press <Return>. Then you type the message, indicating that youre done by typing a period on a line by itself. You can also use <Ctrl-d> to end the message. For an example of how to send e-mail to a user named lynn, enter this command to start the mail system and specify lynns address on your system:
mail lynn Subject: Congratulations! Lunch Thursday?
Now type the message, pressing <Return> when you want to end a line. Heres a sample message that you may want to send to lynn (press <Return> at the end of each line to space the paragraphs of the message):
Lynn, Just wanted to tell you that I thought you did a great job at the meeting yesterday! It seems as if were finally turning this problem around. Want to get together for lunch Thursday? Give me a call. joe .
You can also end the message with <Ctrl-d> instead of a period. The computer responds by displaying EOT, which means end of transmission.
You can cancel a message while youre writing it, but you cant cancel it after its sent. To cancel a message while youre writing it, press whatever key is configured on your system as the interrupt key (usually <Ctrl-c> or <Del>). When a message is canceled, its saved in a file named dead.letter. You can delete this file or edit it later for another message. When using mail, you must press <Ctrl-c> twice to cancel (in case you press <Ctrl-c> or <Del> by mistake). After canceling your mail message, you see the command-line prompt. The following example shows how the cancel function works:
mail lynn Subject: Congratulations! Lunch Thursday? Lynn, Just wanted to tell that I thought you did a great job<Ctrl-c> (Interrupt -- one more to kill letter)
You now must decide whether you want to continue the letter or kill it. If you decide to continue, you just keep typing the text of the letter as follows:
at the meeting yesterday! It seems as if were finally turning this problem around.
At this point, you decide to cancel the letter again, so you press <Ctrl-c> or <Del>. The system responds with (Interrupt -- one more to kill letter). Because you want to kill the message, press <Ctrl-c> or <Del> a second time; mail quits, and you see the shell prompt.
Previous | Table of Contents | Next |