0% found this document useful (0 votes)
42 views9 pages

EMAIL

Uploaded by

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

EMAIL

Uploaded by

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

E-mail

 E-mail is defined as the transmission of messages on the Internet.


 It is one of the most commonly used features over communications networks that may contain text, files, images,
or other attachments.
 Generally, it is information that is stored on a computer sent through a network to a specified individual or group
of individuals.
 Email messages are conveyed through email servers; it uses multiple protocols within the TCP/IP suite.
 For example, SMTP is a protocol, stands for Simple Mail Transfer Protocol and used to send messages whereas
other protocols IMAP or POP are used to retrieve messages from a mail server.
 The first and the second as Message Transfer Agents (MTAs), the third as Message Access Agent (MAA).

Addresses
 To deliver mail, a mail handling system must use an addressing system with unique addresses.
 In the Internet, the address consists of two parts: a local part and a domain name, separated by an @ sign.

Email messages include three components, which are as follows:


1. Message envelope: It depicts the email's electronic format.
2. Message header: It contains email subject line and sender/recipient information.
3. Message body: It comprises images, text, and other file attachments.

Mail Transfer Phases


 The process of transferring a mail message occurs in three phases: connection estab lishment, mail transfer, and
connection termination.
1. Connection Establishment After a client has made a TCP connection to the well known port 25, the SMTP
server starts the connection phase. This phase involves the following three steps:
1. The server sends code 220 (service ready) to tell the client that it is ready to receive mail. If the server is not
ready, it sends code 421 (service not available).
2. The client sends the HELO message to identify itself, using its domain name address. This step is necessary
to inform the server of the domain name of the client.
3. The server responds with code 250 (request command completed) or some other code depending on the
situation.
2. Message Transfer After connection has been established between the SMTP client and server, a single message
between a sender and one or more recipients can be exchanged. This phase involves eight steps. Steps 3 and 4 are
repeated if there is more than one recipient.
1. The client sends the MAIL FROM message to introduce the sender of the message. It includes the mail
address of the sender (mailbox and the domain name). This step is needed to give the server the return mail
address for returning errors and reporting messages.
2. The server responds with code 250 or some other appropriate code.
3. The client sends the RCPT TO (recipient) message, which includes the mail address of the recipient.
4. The server responds with code 250 or some other appropriate code.
5. The client sends the DATA message to initialize the message transfer.
6. The server responds with code 354 (start mail input) or some other appropriate message.
7. The client sends the contents of the message in consecutive lines. Each line is terminated by a two-character
end-of-line token (carriage return and line feed). The message is terminated by a line containing just one
period.
8. The server responds with code 250 (OK) or some other appropriate code.
3. Connection Termination After the message is transferred successfully, the client terminates the connection. This
phase involves two steps.
1. The client sends the QUIT command.
2. The server responds with code 221 or some other appropriate code.
Message Transfer Agent: SMTP
 SMTP stands for Simple Mail Transfer Protocol.
 SMTP is a set of communication guidelines that allow software to transmit an electronic mail over the internet is
called Simple Mail Transfer Protocol.
 It is a program used for sending messages to other computer users based on e-mail addresses.
 It provides a mail exchange between users on the same or different computers, and it also supports:
 It can send a single message to one or more recipients.
 Sending message can include text, voice, video or graphics.
 It can also send the messages on networks outside the internet.
 The main purpose of SMTP is used to set up communication rules between servers.
 The servers have a way of identifying themselves and announcing what kind of communication they are trying to
perform.
 They also have a way of handling the errors such as incorrect email address.
 For example, if the recipient address is wrong, then receiving server reply with an error message of some kind.

Components of SMTP

 First, we will break the SMTP client and SMTP server into two components such as user agent (UA) and mail
transfer agent (MTA).
 The user agent (UA) prepares the message, creates the envelope and then puts the message in the envelope.
 The mail transfer agent (MTA) transfers this mail across the internet.
 SMTP allows a more complex system by adding a relaying system.
 Instead of just having one MTA at sending side and one at receiving side, more MTAs can be added, acting either
as a client or server to relay the email.

 The relaying system without TCP/IP protocol can also be used to send the emails to users, and this is achieved by
the use of the mail gateway. The mail gateway is a relay MTA that can be used to receive an email.
Working of SMTP
1. Composition of Mail:
 A user sends an e-mail by composing an electronic mail message using a Mail User Agent (MUA).
 Mail User Agent is a program which is used to send and receive mail.
 The message contains two parts: body and header.
 The body is the main part of the message while the header includes information such as the sender and
recipient address.
 The header also includes descriptive information such as the subject of the message.
 In this case, the message body is like a letter and header is like an envelope that contains the recipient's
address.
2. Submission of Mail:
 After composing an email, the mail client then submits the completed e-mail to the SMTP server by using
SMTP on TCP port 25.
3. Delivery of Mail:
 E-mail addresses contain two parts: username of the recipient and domain name. For
example, [email protected], where "vivek" is the username of the recipient and "gmail.com" is the
domain name.
 If the domain name of the recipient's email address is different from the sender's domain name, then MSA
will send the mail to the Mail Transfer Agent (MTA).
 To relay the email, the MTA will find the target domain. It checks the MX record from Domain Name
 System to obtain the target domain.
 The MX record contains the domain name and IP address of the recipient's domain.
 Once the record is located, MTA connects to the exchange server to relay the message.
4. Receipt and Processing of Mail:
 Once the incoming message is received, the exchange server delivers it to the incoming server (Mail
Delivery Agent) which stores the e-mail where it waits for the user to retrieve it.
5. Access and Retrieval of Mail:
 The stored email in MDA can be retrieved by using MUA (Mail User Agent). MUA can be accessed by
using login and password.

Message Access Agent: POP and IMAP


 The first and second stages of mail delivery use SMTP.
 However, SMTP is not involved in the third stage because SMTP is a push protocol; it pushes the message from
the client to the server.
 In other words, the direction of the bulk data (messages) is from the client to the server.
 On the other hand, the third stage needs a pull protocol; the client must pull messages from the server.
 The direction of the bulk data is from the server to the client.
 The third stage uses a message access agent.
 Currently two message access protocols are available: Post Office Protocol, version 3 (POP3) and Internet Mail
Access Protocol, version 4 (IMAP4). Figure 26.15 shows the position of these two protocols.
POP3
 Post Office Protocol, version 3 (POP3) is simple but limited in functionality.
 The client POP3 software is installed on the recipient computer; the server POP3 software is installed on the mail
server.
 Mail access starts with the client when the user needs to download its e-mail from the mailbox on the mail server.
The client opens a connection to the server on TCP port 110.
 It then sends its user name and password to access the mailbox.
 The user can then list and retrieve the mail messages, one by one.
 Figure shows an example of downloading using POP3.
 Unlike other figures in this chapter, we have put the client on the right hand side because the e-mail receiver
(Bob) is running the client process to pull messages from the remote mail server.

 POP3 has two modes:


 The delete mode and the keep mode.
 In the delete mode, the mail is deleted from the mailbox after each retrieval. The delete mode is normally used
when the user is working at her permanent computer and can save and organize the received mail after reading or
replying.
 In the keep mode, the mail remains in the mailbox after retrieval.
 The keep mode is normally used when the user accesses her mail away from her primary computer (for example,
from a laptop). The mail is read but kept in the system for later retrieval and organizing.

IMAP4

 Another mail access protocol is Internet Mail Access Protocol, version 4 (IMAP4).
 IMAP4 is similar to POP3, but it has more features; IMAP4 is more powerful and more complex.
 POP3 is deficient in several ways.
 It does not allow the user to organize her mail on the server; the user cannot have different folders on the
server.
 In addition, POP3 does not allow the user to partially check the contents of the mail before downloading.

IMAP4 provides the following extra functions:

 A user can check the e-mail header prior to downloading.


 A user can search the contents of the e-mail for a specific string of characters prior to downloading.
 A user can partially download e-mail. This is especially useful if bandwidth is lim ited and the e-mail contains
multimedia with high bandwidth requirements.
 A user can create, delete, or rename mailboxes on the mail server.
 A user can create a hierarchy of mailboxes in a folder for e-mail storage.
MIME

 Electronic mail has a simple structure.


 Its simplicity, however, comes with a price.
 It can send messages only in NVT 7-bit ASCII format.
 In other words, it has some limitations.
 It cannot be used for languages other than English (such as French, German, Hebrew, Russian, Chinese,
and Japanese).
 Also, it cannot be used to send binary files or video or audio data.
 Multipurpose Internet Mail Extensions (MIME) is a supplementary protocol that allows non-ASCII data to be sent
through e-mail.
 MIME transforms non-ASCII data at the sender site to NVT ASCII data and delivers it to the client MTA to be
sent through the Internet.
 The message at the receiving site is transformed back to the original data.
 We can think of MIME as a set of software functions that transforms non-ASCII data to ASCII data and vice
versa, as shown in Figure.

 MIME Headers MIME defines five headers, as shown in Figure below, which can be added to the original e-mail
header section to define the transformation parameters:

 MIME-Version This header defines the version of MIME used. The current version is 1.1.
 Content-Type This header defines the type of data used in the body of the message.
 The content type and the content subtype are separated by a slash.
 Depending on the subtype, the header may contain other parameters. MIME allows seven different types of data,
listed in Table.
 Content-Transfer-Encoding This header defines the method used to encode the messages into 0s and 1s for
transport. The five types of encoding methods are listed in Table below.

You might also like