25-08-2017, 09:32 PM
HOW EMAIL WORKS
EMAIL WORKS.pdf (Size: 271.45 KB / Downloads: 57)
Every day, the citizens of the Internet send each other billions of e-mail messages. If you are
online a lot, you yourself may send a dozen or more e-mails each day without even
thinking about it. Obviously, e-mail has become an extremely popular communication tool.
Have you ever wondered how e-mail gets from your desktop to a friend halfway around the
world? What is a POP3 server, and how does it hold your mail? The answers may surprise you,
because it turns out that e-mail is an incredibly simple system at its core! In this article, we'll
take an in-depth look at e-mail and how it works!
An E-Mail Message
The first e-mail message was sent in 1971 by an engineer named Ray Tomlinson. Prior to this,
you could only send messages to users on a single machine. Tomlinson's breakthrough was the
ability to send messages to other machines on the Internet, using the @ sign to designate the
receiving machine.
An e-mail message has always been nothing more than a simple text message -- a piece of text
sent to a recipient. In the beginning and even today, e-mail messages tend to be short pieces of
text, although the ability to add attachments now makes many e-mail messages quite long.
Even with attachments, however, e-mail messages continue to be text messages -- we'll see why
when we get to the section on attachments.
E-Mail Clients
You have probably already received several e-mail messages today. To look at them, you use
some sort of e-mail client. Many people use well-known stand-alone clients like Microsoft
Outlook, Outlook Express, Eudora or Pegasus. People who subscribe to free e-mail services like
Hotmail or Yahoo use an e-mail client that appears in a Web Page. No matter which type
of client you are using, it generally does four things:
• It shows you a list of all of the messages in your mailbox by displaying the message
headers. The header shows you who sent the mail, the subject of the mail and may also
show the time and date of the message and the message size.
• It lets you select a message header and read the body of the e-mail message.
• It lets you create new messages and send them. You type in the e-mail address of the
recipient and the subject for the message, and then type the body of the message.
• Most e-mail clients also let you add attachments to messages you send and save the
attachments from messages you receive.
Sophisticated e-mail clients may have all sorts of bells and whistles, but at the core, this is
all that an e-mail client does.
Simple E-Mail Server
Given that you have an e-mail client on your machine, you are ready to send and receive e-mail.
All that you need is an e-mail server for the client to connect to. Let's imagine what the
simplest possible e-mail server would look like in order to get a basic understanding of the
process. Then we will look at the real thing.
The simplest possible e-mail server would work something like this:
• It would have a list of e-mail accounts, with one account for each person who can
receive e-mail on the server. Lets say amit and suresh.
• It would have a text file for each account in the list. So the server would have a text
file in its directory named AMIT.TXT, another named SURESH.TXT, and so on.
• If someone wanted to send a message, the person would compose a text message
("Amit, Can we have lunch Monday? Suresh") in an e-mail client, and indicate that the
message should go to amit. When the person presses the Send button, the e-mail client
would connect to the e-mail server and pass to the server the name of the recipient
(amit), the name of the sender (suresh) and the body of the message.
Real E-Mail System
For the vast majority of people right now, the real e-mail system consists of two different
servers running on a server machine. One is called the SMTP server, where SMTP stands for
Simple Mail Transfer Protocol. The SMTP server handles outgoing mail. The other is either a
POP3 server or an IMAP server, both of which handle incoming mail. POP stands for Post
Office Protocol, and IMAP stands for Internet Mail Access Protocol.
IMAP Server
As you can see, the POP3 protocol is very simple. It allows you to have a collection of messages
stored in a text file on the server. Your e-mail client (e.g. Outlook Express) can connect to your
POP3 e-mail server and download the messages from the POP3 text file onto your PC. That is
about all that you can do with POP3.
Many users want to do far more than that with their e-mail, and they want their e-mail to
remain on the server. The main reason for keeping your e-mail on the server is to allow users to
connect from a variety of machines. With POP3, once you download your e-mail it is stuck on
the machine to which you downloaded it. If you want to read your e-mail both on your desktop
machine and your laptop (depending on whether you are working in the office or on the road),
POP3 makes life difficult.
IMAP (Internet Mail Access Protocol) is a more advanced protocol that solves these problems.
With IMAP, your mail stays on the e-mail server. You can organize your mail into folders, and
all the folders live on the server as well. When you search your e-mail, the search occurs on the
server machine, rather than on your machine. This approach makes it extremely easy for you to
access your e-mail from any machine, and regardless of which machine you use, you have
access to all of your mail in all of your folders.
Your e-mail client connects to the IMAP server using port 143. The e-mail client then issues
a set of text commands that allow it to do things like list all the folders on the server, list all the
message headers in a folder, get a specific e-mail message from the server, delete messages
on the server or search through all of the e-mails on the server.
One problem that can arise with IMAP involves this simple question