What is Mail?

Mail is a program that you can use to send messages to another person. This person can be sitting at the computer next to, or can be in another room, city, or country. All you need to know is your correspondents address. If it is someone on the mathematics department system it might be just amanda, jeremy, or zoe. For person outside the local system, you need a more complete address.

Contents

Basics

Managing your mail

More information

Basics

The first thing we need to do is to learn to send mail and read mail sent to us. For this purpose we imagine a correspondence between Fred and Jeremy, whose user names are fred and jeremy, respectively. In this correspondence what the computer "types" will look like this ,and what humans type will look like this. When a human types a command to a computer, he/she always finishes it by pressing the "return" key. Think of this as saying to the computer "return to action!"

Sending mail

Let us imagine that about 9 AM Fred, who is working on a machine called solitude wishes to send a message to Jeremy, who has a computer account on our system, but who is probably at home asleep at this early hour.
solitude% mail jeremy
Subject: Lunch

I'll be finished work pretty soon.  Want to meet
for lunch?  We can order a pizza and work on the
physics assignment.

See ya,

  Fred

ctrl-d

EOT
solitude%

It is pretty clear what happened: Fred sent Jeremy a letter about lunch, pizza, and physics. To do this he typed a command, namely mail jeremy. Solitude, the computer, accepted this command and asked for the subject of message, which Fred typed in as "Lunch." Fred then typed in his message. He had to be careful, because mail allows you to backspace to fix mistakes, but doesn't allow to go back to previous lines.

When Fred was finished with his message he typed ctrl-d . To do this he held the control key down (lower left of keyboard) and, while it was down, pressed the key "d ". Think of "d" as meaning "done." Solitude, the computer, replied to Fred, "EOT", which is jargon for "end of transmission." Once the transmission was sent, solitude resumed its eternal wait for Fred's (or someone else's) commands.


Reading mail

Now let us imagine the Jeremy logs into a machine named jeeves about 10 AM --- an hour after Fred sent him mail. He might notice a message you have new mail. In any case, Jeremy types the mail command to see if he has any messages waiting for him. Below you will see what Jeremy saw, and what he did. In brief, he saw that there was one unread message waiting for him, message number 6. To read it, he typed the command 6. After reading the message, he replied to it by typing "r". Once Jeremy composed his message, he typed ctrl-d to send it. Then he left mail by typing q. Study the example below, and you will see how to do it.
jeeves% mail
Mail version xx .... Type ? for help.
"/usr/spool/mail/jeremy": 1 message 1 new
>N  6 fred    Mon Mar 14 23:59   Lunch
& 6
Message  6:
From Fred Mon Mar 14 9:01:09 1994
To: Jeremy
Subject: Lunch

I'll be finished work pretty soon.  Want to meet
for lunch?  We can order a pizza and work on the
physics assignment.

See ya,

  Fred

& r
To: fred
Subject: Re:  Test

OK, I'll meet you at the Union by the pinball
machines at 12 on the dot!

  -- Jeremy

ctrl-d
EOT
& q
jeeves%
Notes:


Electronic addresses

Electronic mail addresses follow a simple format:
     login-name@address

The login name is usually not the user's full name, but often you can guess it. For example, Carl Friedrich Goss's might by goss, cgoss, or cfg. The names of people in math classes follow a special rule. If Carl were taking a class, his login name would be c-gcf . Note the algorithm: c- followed by last initial followed by first and middle initial. If Carl had no middle initial, his log-in name would be c-gc. If there were many Carl Gosses, his log-in name might be something like c-cg21 Below are some examples.

If you know someone's e-mail address, you can send mail to them. These are internet addresses. The internet at academic institutions in the US is .edu. For US businesses, including online services it is .com. For example, gipper@aol.com might be the address of someone on America Online. Govermental organizations have the .org suffix.


Managing your mail

If you send and receive very many messages, you will need a way to manage your mail. This section teaches you how to do this.

Headers, deleting messages

When Jeremy types mail he usually gets what is called a list of headers (see below). There is one header from Fred, another from Amanda. The message from Fred is unread, the message from Amanda is new. To read these messages tap the spacebar or, alternatively, type the message number.

solitude% mail
Mail version xx .... Type ? for help.
"/usr/spool/mail/jeremy": 2 messages 1 new 2 unread
 U  21 fred            Tue Mar 15 09:13   33/658   Lunch
>N  22 amanda          Tue Mar 15 09:55   42/863   Physics
&

Let's suppose that we read these messages and then wish to delete them. To make sure we know what the message headers are, we type the command h after the & prompt. This redisplays the headers. Once we have the headers in front of us we can do things with them.

In the transcript below Jeremy looks at his headers, deletes message 21, looks at his headers again, then undeletes message 21. Finally he figures out what he really wants to do, deletes the message for good and quits mail

& h
   21 fred            Tue Mar 15 09:13   33/658   Lunch
>  22 amanda          Tue Mar 15 09:55   42/863   Physics
& d 21
& h
>  22 amanda          Tue Mar 15 09:55   42/863   Physics
& u 21
& h
   21 fred            Tue Mar 15 09:13   33/658   Lunch
>  22 amanda          Tue Mar 15 09:55   42/863   Physics
& d 21
& q
solitude%


Old mail

After studying math and physics all day with Amanda and Fred, Jeremy goes to the computer lab to check his mail. He received mail from his parents several days ago but didn't have a chance to reply. To his horror, when he types mail, he gets the message No mail for jeremy. Then he realizes what Amanda told him earlier: use the command

mail -f

This brings up all the old mail messages. The last message from Mom and Dad is number 5, so Jeremy proceeds as follows:

& r 5
Subject: School, etc.

Dear Mom and Dad,

  Everything is going fine.  I've been studying for the
math and physics exams all day with Fred and Amanda.
I think we all know what we are doing now (at last!).
Say hi to little Johnny.  I'll be home next week for
Spring break and am looking forward to catching up
on sleep, and to some good meals:)

  Love,  Jeremy
ctrl-D
EOT
& q
solitude%


More help and information

You can get some help from mail by typing "? " right after the & prompt. Additional information is available by typing man mail , e.g.,

   solitude% man mail

This is an example of using the "manual pages." In order do this successfully you need to know how to use the Unix command more.