Introduction to Sending and Receiving Electronic Mail

Introduction to Sending and Receiving Electronic Mail

Index:

	Introduction 
	How to Send Mail
	Aborting or Quitting a Message
	Editing a Message
	Mailing  A File
	Retrieving and Reading Mail
	Forwarding a Message 
	Commands for Retrieval of Mail 

Introduction

This guide to the Unix Mail System introduces you to the procedures
for sending and receiving mail, sending files by mail, and adding
messages to files that are sent by mail.    We hope that this guide is
easy to follow and understand. Please send suggestions and
comments to the SURAnet Network Information Center.
(tel. (301) 982-4600  email [email protected]).

By using email, you are able to send messages or entire files at your
convenience to anyone, anywhere on the network.  Mail can be sent to
you without you being present  to receive it.  The system
automatically stores your mail until you are ready to read it.

How to send mail 

To send a message, you must know  the addresses of  persons to
whom you wish to send mail.  Email addresses can be quite complex.  
See Frey, D. & Adams, R.  (1990)  A Directory of electronic mail
addressing and networks.  Sabastopol, CA: O’Reilly Associates.  for a
full discussion.

 EXAMPLES OF EMAIL ADDRESSES:

[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

To send a message you must tell the system that you want to send
mail and to whom it is to be sent. You do this by typing mail
followed by the address, all on the same line (See Figure 1, line 1). 

After you have typed the address, the system responds with  
Subject:.   (system prompts you for a brief description of the
message.   See Figure 1, line 2).  Type a brief description of the
message to be sent.  This description will be displayed as part of a
message header for the person receiving the message. It enables the
recipient  to determine the nature of the message without first
having to read the entire message.  After typing the subject of the
message, go on to  type the message itself (see Figure 1, lines
3-10.)

To send a message to [email protected]  the command sequence is as
follows:
============================================================


    % mail [email protected] <return>
    Subject: Short Description of Message  <return>
   Body of Message  Body of Message Body of Message
   Body of Message  Body of Message Body of Message
   Body of Message  Body of Message Body of Message
   .
   Cc: Addresses of persons to whom copies are to be sent  <return>
    %

EXAMPLE:

 1	%mail [email protected] 
 2	Subject: List of days off
 3	Brad,
 4	I just wanted to let you know that I plan to take the following
	days
 5	off this month
 6 			June 12 Thursday
 7			June 21 Monday
 8			June 28 Friday
 9	Thanks,
10	Steve
11	.
12	Cc: [email protected]  [email protected]
13	 %

Once you have finished typing the body of the message, simply type a
period on the next empty line (see Figure 1, line 11). The system
responds with Cc:   At this point, type the e-mail addresses of
persons to whom you would like copies of the message sent. (see
Figure 1, line 12).  If you don’t want copies sent to anyone, just
press the return key. 


*** The text of the message does not automatically wrap at the end
of a word.  To avoid words at the end of a line being sliced, press
return when you near the end of a line *** 
*** The numbers in the left hand margin do not appear on the
	screen***
=============================================================Figure 1.


		Step by Step Explanation of Figure1

1	User enters Unix mail mode, addresses the message to
	[email protected]
2	User is prompted for subject. User responds with subject of
	message
4 -10	User types a message
11	User ends message by typing a period on the next blank line
12	User enters addresses of persons to whom copies are to be
	sent
13	Unix % or mail & command prompt appears on screen                     

          
Terminating or Quitting a Message

To terminate a message after you have started typing(i.e., quit
without sending the message), simply type: CTRL-C (hold down the
control key and press the c key.)


Editing your message 

If you make a mistake, it is possible to edit the line that you are
currently typing by simply backspacing and re-entering the text.   To
edit other lines you should use vi, the Unix text editor. (See
document on vi  available from SURAnet)
To enter vi while in mail, type  ~vi  <return>

Mailing a file to another person

The procedure for sending a file to another person is similar to
sending a message, except that you tell the system that you want to
send a file instead of a message.  The format for sending a file is:

	% mail “address” <  “filename” <return>


EXAMPLE:

	% mail [email protected] < set.list  <return>

This command tells the system that you want to send mail to
[email protected] and the mail is to contain a file entitled set.list.  The
redirection sign  < tells the system that a  file is to be sent. To add
a message to a file see the section on vi.

After pressing return, the Unix prompt appears on the screen, this
indicates that the message has been sent, in this case the file named
“set.list” is sent to [email protected].  

Retrieving and reading mail 

The Unix system handles all mail sent to you by appending each piece
of mail to a special system mail box file associated with your user
account. If mail is waiting for you when you login, you will see the
message, “You have mail”.  In order to retrieve the messages that
have been stored on your behalf, simply type mail   and press return.

The system responds with a list of mail messages waiting for you
(See Figure 2).

If you type mail  when there is no mail waiting for you, a message,                              


No Mail for “username”, appears on the screen.
=============================================================
EXAMPLE:

 1	login:  mtaranto 
 2	Password:
 3	Last login:  Mon Jul 15  08:39:50 from admin-mac.sura.n
 4	Ultrix Worksystem V2.1  (Rev. 14)  System #3:  Mon Feb 27
	20:48:48
	EST 1989
 5	You have mail
 6	Mon Jul 15 11:55:13 EDT 1991
 7	%  mail
 8	Mail version 2.18 5/19/83.  Type ? for help.	
 9	“/usr/spool/mail/mtaranto”:  2 messages 2new
10	U 1 [email protected]  Mon Jul 15 11:43  13/450  “November
	Workshop”
11	U 2 [email protected] Sun Jul 14 10:34:23  13/445  “todays
	schedule”
12     >N 3 [email protected]    Sat Jul 13 11:32:11 12/763 “tonights
	activities”
13	N 4 [email protected]     Mon Jul 15 09:54:32  12/543 “reminder”
14	& 
          
***The numbers in the left hand margin do not appear on the
screen***
==========================================================
Figure 2

		Step by Step Explanation of Figure 2

	1-4	the user logins to the system
	5	the system tells the user he has mail
	6	the time and date of user login
	7	user invokes the mail command
	8-11	the system begins the mail command mode with a listing
		of mail that has arrived.  The system will tell the user if
		the mail is New or Unread by posting in front of the
		message header  N for new or U for unread, and no posting
		if the message is left from an earlier mail session.
	10-13 messages waiting to be read
	14	Unix mail mode prompt    

To display a message on the screen, type the message number and
press return.
If you press <return> only, the message with > will be displayed. (see
Figure 2, line12)

Forwarding a Message

You may want to forward a message you have just received to
another person.  The forwarding process is very similar to sending
an ordinary message to another person. The principal difference is
that you embed a command in the body of the message that instructs
the system to insert the message to be forwarded.  In effect, when
you forward a message, you are actually sending 2 messages -- the
message to be forwarded and another, ordinary message that wraps
around the message to be forwarded.

Example: 

You have just received this message and want to forward it to your
colleague Brad.

From [email protected] Fri Jul 19 08:22:12 1991
Received: from cyber.mbhs.edu by noc.sura.net with SMTP (5.65+/($Id:
sendmail.cf,v 1.18 1991/07/18 01:07:10 jmalcolm Exp $))
	id AA21989; Fri, 19 Jul 91 08:13:21 -0400
Date: Fri, 19 Jul 91 08:13:21 -0400
From: [email protected]
Message-Id: <[email protected]>
Apparently-To: [email protected]
Status: RO

I am very interested in sources of information mentioned in summer
SURAnet Connection.  I am putting together a handbook for teachers
here at Blair to use in working with students in accessing Internet
resources. I am also working on a session at the National Consortium
of Specialized Secondary Schools for Mathematics, Science, and
Technology conference which will be held at NIST in March on
Telecommunications in student research.  Please mail me as
[email protected], since mail here at school is not working
(incoming).  Thank you.
      Mary Ellen Verona, Montgomery Blair High School

To forward the message, send Brad an ordinary message and embed
in the body of the message a command that tells the system to
include the message above.  The Command to do this is ~m


& mail [email protected]
Subject: Internet Information Sources

Brad,
	I think you will be interested in this

~m

	Let me know what you think

Peter



This method of forwarding messages has the advantage of allowing
you to attach notes to a message -- as in the example above.
When Brad receives this message the original message will appear in
place of the ~m

The message that Brad receives will look something like this 

From [email protected] Thu Aug 15 09:35:19 1991
Received: from umd5.umd.edu by noc.sura.net with SMTP (5.65+/($Id:
sendmail.cf,v 1.18 1991/07/18 01:07:10 jmalcolm Exp $))
	id AA04615; Thu, 15 Aug 91 09:35:12 -0400
Received: by umd5.UMD.EDU (5.57/Ultrix2.4-C)
        id AA21318; Thu, 15 Aug 91 09:35:10 EDT
Date: Thu, 15 Aug 91 09:35:10 EDT
From: [email protected] (Peter Liebscher)
Message-Id: <[email protected]>
To: [email protected] 
Subject: Internet Information Sources
Status: R


Brad,

	I think that you will be interested in this


>From [email protected] Fri Jul 19 08:22:12 1991
Received: from cyber.mbhs.edu by noc.sura.net with SMTP (5.65+/($Id:
sendmail.cf,v 1.18 1991/07/18 01:07:10 jmalcolm Exp $))
	id AA21989; Fri, 19 Jul 91 08:13:21 -0400
Date: Fri, 19 Jul 91 08:13:21 -0400
From: [email protected]
Message-Id: <[email protected]>
Apparently-To: [email protected]
Status: RO

I am very interested in sources of information mentioned in summer
SURAnet Connection.  I am putting together a handbook for teachers
here at Blair to use in working with students in accessing Internet
resources. I am also working on a session at the National Consortium
of Specialized Secondary Schools for Mathematics, Science, and
Technology conference which will be held at NIST in March on
Telecommunications in student research.  Please mail me as
[email protected], since mail here at school is not working
(incoming).  Thank you.
      Mary Ellen Verona, Montgomery Blair High School

	Let me know what you think

Peter

The mail environment has its own  set of commands to display, save,
delete,and forward messages, as well as other functions.  The mail
system prompt is, “&”.  When you see the “&” prompt, you may type
the mail commands.  Command names are usually single letters, and
messages are referred to by the numbers which appear in the
original list of messages.  You can see a brief summary of the
commands available by typing “?” at the mail prompt.  Here is a list
of commands for use during the retrieval of mail.

Commands for retrieval of mail in the Unix mail command

<return>		proceeds to next message
+			proceeds to next message
-			returns to preceding message
d or do		proceeds to the next message after deleting the
message
			just displayed
dn      		deletes the message number specified by n and does
not
			go to  next message      
 dq			quits mail after deleting the current message
h			list a window of headers (description of numbered
			messages), including the current messages
hn			displays the header for the message specified by n
ha			displays all the message headers
hd			lists headers for messages that are marked for
			deletion
n 			proceeds to next message
p			redisplays the message
q			quits and puts undeleted mail back into the mail
file
r			reply to a message
s filename		deletes the message from the system mail file and
saves
			it in the designated file.  If you do not define the
			file, it
			saves the message
			in the mbox file in your home directory.
<^D> 			works the same as q
x			exits mail with all the messages unchanged as
though 
			you hadn’t used the mail command
y			same as s
?			displays mail commands