0% found this document useful (0 votes)
25 views10 pages

Appln - Email

Uploaded by

Lena Devaraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views10 pages

Appln - Email

Uploaded by

Lena Devaraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

ELECTRONIC MAIL

Electronic mail or E-mail as it is popularly called, is a system that allows a person or a group to
electronically communicate with each other through a netork. Presently people can now receive
and send e-mail to:
 nearly any country in the world.
 one of millions of computer users.
 many users at once.
 computer programs.
The first e-map systems consisted of file transfer protocols, with the convention that the first line
of each message contained the recipient address. Some of the complaints at that time were

1. Sending a message to a group of people was inconvenient.


2. Messages had no internal structure, making computer processing difficult.
3. The sender never knew if a message arrived or not.

Computer Networks
4. It is difficult to forward the mails.
5. It is not possible to create and send messages containing a mixer of text, drawing
facsimile and voice.

After a decade of competition, email systems based on RFC822 are widely used, where all the
above problems are solved.

BASIC FUNCTIONS

Email systems support five basic functions, which are: Composition, Transfer, Reporting,
Displaying and Disposition.
6. Composition is a process for creating the messages and answers. This can be done by
text editor, outside the mailer, the system will provide assistance in addressing and
numerous header fields attached to each message. For eample:when answering a
message, the e mail system can extract the originator’s address from the incoming e-mail
and automatically insert it into the address space in reply.
2. Transfer refers to moving of messages from the source to the recipent. In some cases,
connection establishment is needed with the destination, outputting the message and
releasing the connection. The e-mail system should do automatically this.
3. Reporting is used to indicate the originator what happened to the message i.e.,
confirmation of the message delivery. Was it delivers successfully? Was it rejected? Was
it lost? Did errors occur?
4. Displaying It refers to read the incoming e-mail by the person. Sometimes conversion is
required or a special viewer must be invoked.
5. Disposition It concerns what the recipient does with the message after receiving it. The
possibilities are
(a) Throwing it away before reading
(b) Throwing it away after reading.
(c) Saving it and so on. It is also possible to forward them or process them in other
ways.
In addition to these basic services, most of e-mail systems provide a large variety of advanced
features such as
(a) It allows to create a mailbox to store incoming e-mail.
(b) It allows to have a mailing list, to which the e-mail messages have to send.
(c) Carbon copies, high priority email, secret email, registered email etc.

Computer Networks
THE USER AGENT
The user agent is a program that allows users to read reply to, forward, save and compose
messages. User agents for electronic mail are sometimes called mail readers. Some user agents
have menu or icon driven interface that requires a mouse, some other requires only 1 character
command from keyboard.

Sending e-mail: To send an email message the user must provide


(a) message
(b) destination address and
(c) priority or security levels (options).

 Message can be produced with a free standing text editor, a word processing
program or by using a text editor built into the user agents. The format of an e-mail
message is similar to that of a conventional letter.
There are two main parts: Header and body.
The header contains out name and address, the name and address of the person it’s
being sent to, the name and address of the person who is being sent a copy, the date of
the message and the subject when we receive an e-mail from someone, the header tells us where
it came from, what it is about, how it was sent and when.

The body is the place where we write the contents of what we want to communicate. The
message sent should be simple and direct. Body is entirely for human recipient.

 The designation address must be in a format that the user agent can deal with. The basic
form of e-mail address is
User name @host name.subdomain.domain.

The text before the sign @(pronounced “at”) specifies the user name of the individual, the text
after the @ sign indicates how the computer system can locate that individual’s mailboxes.
For example
[email protected]
Here cs is a sub domain of Colorado is a sub domain of edu.the edu specifies the top-level
domain name.
The number of periods (pronounced as dots) varies from e-mail address.
Reading e-mail: On connecting to the net, the first thing a user usually does is check his mail, it’s
like checking the mailbox when we go home. The display like fig 5.28 appears on the screen.
Computer Networks
Each line refers to one message. In the fig, the mailbox contains 4 (four) messages. The display
line contains several fields, which provides user profile.

S.No Flag Bytes Sender Subject

1. K 1000 n/p Got the job

2. KA 2000 Smer Request for MP

3. KF 4000 Vimicro Repair of controller

4. 1536 hiq Enquiry of the book


AN EXAMPLE OF THE CONTENTS OF THE MAIL BO X

 The first field is the message number.


 The second field is flags, can contain,
K-means that, message was read previously and kept in mail box.
A-means the message has already answered and
F-message has been forwarded to someone else.
 The third field indicates the length of the message in bytes.
 Fourth field tells who sent the message, this field is simple extracted from the message, so
this field contains initials, log in name, first name etc.
 The last field is a ‘subject field’ gives brief summary of the message.
MESSAGE FORMATS
The e-mail message format was defined in RFC 822.There are two types: ASCII e-mail
and multimedia extensions.
ASCII e-mails using RFC 822: The e-mail message consists of a primitive envelope, some
number of header fields, a blank like and then message body.
Each header field consists of a single line of ASCII text containing the field name, a colon, and
a value of RFC.
The list of header fields related to message transport are
 A recipient’s address or “To”
 A sender’s address or “From”
 A subject.

The email header may additionally contain.


 A List of “Cd”: This is a list of e-mail or ‘carbon copies’ addresses to whom a copy of the
message is to be delivered. Multiple e-mail addresses in the “Cc” field are separated by a
comma.
Computer Networks
 A List of “Bc”: This is same as “Cc” except that this is a carbon copy. The list of recipients
is not visible to the person who receives this message.
 Attached: This is a convenient method to share both data and programs. These files may
be attached or enclosed with an e-mail message.
 Signature: It contains sender’s full name and address or whatever information the sender
wishes to send.
Instead of creating a message from the scratch, we may choose to reply or forward the
messages.
 Replying: When we reply a message, the sender’s address is automatically put in the “To”
header and subject of the original message is reduced proceeded by Re, for the reply.
 Forwarding: When we forward a message, the subject of the original message is reused,
with prefix “FW”.We must specify the e-mail address of the recipient of the forward
message.
 Redirecting: Some e-mail programs allow to redirect messages. It is similar to forwarding
a message, except that the message retains the original sender in the form header and
adds a notation that the message comes through you.

Multipurpose Internet Mail Extensions(MIME):

This is the solution defined in 1341 and updated in 1521 for the following problems.
1. Messages in languages with accents.
2. Messages in non Latin alphabets.
3. Messages in languages with out alphabets.
4. Messages not containing text at all.

The basic idea of MIME is to continue the use of RFC 822 format, but to add structure to the
message body defined encoding rules for non ASCII formats. The MIME messages can be sent
using the existing mail programs, and protocols.
The MIME defines five new message header

 MIME-Version: It tells the use agent receiving the message that it is dealing with a MIME
message, and which version of MIME it uses.
 Content-Description: It tells what is there in the message, this header helps the recipient
whether it is worth decoding and reading the message.

Computer Networks
 Content-Transfer Encoding: It tells how the body is wrapped for transmission through a
network that may object to most characters other than letters, numbers and punctuation
marks.
 Content-Type: It specifies the nature of the message body. Seven types are defined in
RFC 1521, each of which has one or more sub types. The type and sub type are
separated by a slash. The sub type must be given explicitly in the header, no defaults are
provided. Table 5.4 shows the list of types and sub types.
TYPE AND SUB TYPE FIELDS DEFINED IN RFC 1521
S.No Type Sub Type Meaning
1. Text Plain Unformated text
HTML Hyper text mark up language
Rich Allows a simple mark up language to the
text included in the text (standardized general ma
up language (SGML) rk
2. Image GIF To transmit still pictures in GIF format
JPEG To transmit still pictures in JPEG format
PNG To transmit still pictures in portable network
graphics
3. Audio au Sun micro systems sound
Basic Audiable sound
aiff Apple sound
4. Video sgi.movie Silicon graphics movie
MPEG Visual information, the video format is
moving picture experts group MPEG
avi Microsoft audio video interleaved
5. Application Octet stream It is a sequence of uninterrupted bytes
Post Script Which refers the postscript
language
produced by Adobe systems and widely
tex used for describing printed pages.
TEX document.
6. Message RFC822 A MIME RFC-822 message (ASCII
characters message)
Partial Break and encapsulated message up into
pieces and send them separately.
External Used for very long message (i.e., video
films)
7. Multiport Mixed Each part to be different with no additional
structure imposed
Alternative Each part must contain the same message
but expressed in a different medium or
Parallel encoding.
Digest All parts must be viewed simultaneously
Many messages are packed together into
composite message.

Computer Networks
MESSAGE TRANSFER
The message Transfer system, MTS is concerned with relaying messages from originator to the
recipent.The simplest way to do this is to establish a transport connection from source machine to
the destination machine and just transfer the message.
Mail servers are from the core of the e-mail infrastructure.Each recipient has a mail box, located
in one of the mail servers.A typical message starts its journey in the sender’s user agent, travels
to the sender’s main server, and then travels to the recipient mail server where it is deposited in
the recipient mail box.
A mail server needs to be running all the time, waiting for e-mail messages and routing them
approximately.If a mail server crashes or down for an extended period(3-4 days), e-mail can be
lost.There may be a limitation on the size of mail box.Generally once this limit is reached, new
incoming messages are refused until you free up space by deleting some messages.
SIMPLE MAIL TRANSFER PROTOCOL-SMTP
The simple mail transfer protocol (SMTP) is the principal application layer protocol for internet e-
mail. It is simple ASCII protocol. It uses the reliable data transfer service of TCP to transfer mail
from the sender’s mail server to the recipient’s mail server. In most application protocols SMTP
has two sides: a client side, which executes on the sender’s mail server and a server side-which
executes on the recipient mail server. When a mail server sends a mail (to other mail server), it
acts as a client SMTP.When a mail server receives a mail (from other mail server), it acts as an
SMTP server.
The SMTP defined in RF821, is at the heart of Internet e-mail.SMTP is much older than HTTP.To
illustrate the basic operation of SMTP, let’s walkthrough a common scenario. Suppose Ramu
wants to send Raju a simple ASCII message.
 Ramu invokes his user agent for e-mail, provides Raju’s e-mail address(example
Raju@some school.edu) composes a message, and instructs the user agent to send the
message.
 Ramu’s user agent sends the message to his mail server, where it is placed in a message
queue.
 The client side of SMTP, running on Ramu’s mail server, sees the message in the
message queue.It opens a TCP connection to a SMTP running Raju’s mail server.
 After some initial SMTP hand shaking, the SMTP client sends Ramu’s message into the
TCP connection.
 At Raju’s mail server host, the server side of SMTP recives the message.Raju’s mail
server then places the message in Raju’s mail box.
 Raju invokes his user agent to read the message at his convenience.
The scenario is summarized in fig.5.29

Computer Networks
SMTP

Ramu’s mail Raju’s mail


server Internal server

RAMU’S MAIL SERVER TRANSFERS RAMU’S MESSAGE TO RAJU’S MAIL SERVER

Let us now take closer look at how SMTP transfers a message from a sending mail server to a
receiving mail server.
We will see that the SMTP protocol has many similarities with protocols that are used for face-
to-
face human interaction.
 The client SMTP has TCP to establish a connection on port 25 to server SMTP.If server is
down, the clients tries again later. Once the connection is established, the server and
client perform some application layer handshaking. During this SMTP handshaking phase,
the SMTP client indicates the e-mail address of the sender and the e-mail address of the
recipient. Once the SMTP client and server have introduced themselves to each other, the
client sends the message, SMTP can count on the reliable data transfer service of TCP to
get the message to the server without errors. The client then repeats this process over the
same TCP connection if it has other message to send to the server; otherwise it instructs
TCP to close the connection.
Even though the SMTP protocol is well defined, a few problems can still arise. These are.
1. Related to the Message Length : Some older implementations cannot handle messages
exceeding 64kB.
2. Related to Time Outs : If the client and server have different time-outs, one of them may
give up while the other is still busy, unexpectedly terminating the connection.
3. Infinite mail storms can be triggered .
To get around some of these problems, extended SMTP (ESMTP) has been defined in
RFC1425.
E-mail Gateways: E-mail using SMTP works best when both the sender and receiver on the
internet and can support TCP connections between sender and receiver.However many

Computer Networks
machines that are not on the internet)because of security problem) still want to send and recive e-
mail from internet sites.
Another problem occurs when the sender speaks only RFC822 and the receiver speaks only
X.400 or some proprietary vendor specific mail protocol.
Both these problems can be solved using application layer e-mail gateways fig.5.30 shows the
gateway.

Host 1 Gate way Message buffer Host 2

Mail Box 1 1 2 2 Mail

Box

TCP connection TCP connection

USE OF EMAIL GATEWAY Network


 Here Host1 speaks only TCP/IP and RFC822, where as host 2 speaks only OSITP4 ans
X.400.
They can exchange e-mail using an e-mail gateway.
Procedure:
1. Host 1 establishes a TCP connection to gateway and then use SMTP to transfer message
there.
2. The gateway then puts the message in a buffer of messages destined to host 2.
3. A TP4 connection is established between host 2 an the gateway.
4. The message is transferred using OSI equivalent of SMTA.
The problems here are
(a) The Internet address and X.400 address are totally different. Need of elaborating
mapping mechanism between them.
(b) Envelope and header fields are present in one system and are not present in the
other.
MAIL ACCESS PROTOCOL
Till now we have assumed that an users work on machines that are capable of sending and
receiving e-mail. Sometimes this situation is false. For example in an organization, users work on
desktop PCs that are no in the internet and are capable of sending and receiving e-mail from
outside. Instead the organization has one or more e-mail servers that can send and receive e-

Computer Networks
mail. To sned and receive e-mails, a PC must talk to an e-mail server using some kind of delivery
protocol.
There are currently two popular mail access protocols:POP3(Post office Protocol version3 ) and 1
MAP (internet mail access protocl)
POP3 : POP3 defined in RFC 1939, it is an extremely simple amil access protocol.POP3 begins
when the user agents (clients) opens a TCP connection to the mail server (the server) on port
100.With the TCP with TCP connection established, POP3 progress through three phases.
1. Authorization: The user agent sends a user name and a password to authenticate the
user downloading the mail.
2. Transaction: The user agent receives messages. In this phase the user agent can also
mark messages for deletion, remove deletion marks, and obtain mail statistics.
3. Update: During the third phase, update occurs after the client has issued the quit
command, ending the POP3 session. This time the mail server deletes the messages that
were marked for deletion.
IMAP: The Internet Mail Access Protocol (IMAP), is defined in RFC 2060.It has many features
than POP3 , but it is also significantly maore complex. It was designed to help the user whi uses
multiple computers, perhaps a workstation in the office, a PC at a home and laptop on the
road.The basic idea behind IMAP is for the e-mail server to maintain a central reposition that can
be accessed from any machine.Thus unlike POP3 , IMAP does not copy email to the user’s
personal machine because the user may have several.
The IMAP has many features.
a) It has commands that permit a user agents to obtain components of messages. This feature is
useful when there is a low bandwidth connection between the user agent and mail server.
b) An IMAP session consists of a client command, server data and a server completion
result
response.
The IMAP server has four states.
1. Non Authenticated State: Initial state whenthe connection begins, the user must supply a
user name and password before most commands will be permitted.
2. Authenticated State: The user must select a folder before sending commands that affect
messages.
3. Selected State: The user can issue commands that affect messages.
4. Log Out State: Here the session is terminated.

* * ** *

Ref: Computer Networks

You might also like