This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
3. Electronic Mail
An email is a communications system that allows people on the same computer network (or to different computer networks) to exchange messages. The message can be in the form of text, image or any other form of data. Email usually states the sender's name, email address, and the date on which the message is sent. A user then can store, delete, reply, or forward the message to desired person or a group of people. Due to its ease of usage and many more advantages email is now a days used in every organization, company and institute. Furthermore, new mobile phones also allow connecting to your mail server from anywhere in the world.
3.1 Popularity of Email
Email is a way to communicate with people no matter how near or far they are. It can be compared with the process of sending letters. A letter is written and then posted in a postbox from where it is send to the post office. In the post office each letter is sorted out according to their addresses and is then send to the related post office from where the postman delivers the letter to the desired person. This is a very long and tedious way of sending message. This system of sending message physically is now replaced by the email system which is more convenient form of sending and receiving messages.
Below are some more advantages of email:
- It is the fastest method of sending or receiving messages. One can send messages from anywhere in the world to any other person anywhere in the world.
- As compared to other message delivering facilities like telephone calls, courier service email is less expensive. There are no charges to send or receive messages through email.
- For every email there is a subject line which helps to identify the topic of the message. Hence, email makes it easier for the user to sort out their important messages.
- Email can be considered as the most reliable and the most secure system of communication. There is no chance of leaking out of the information.
- When the message is sent an acknowledgement message or delivery report is received which assures the mail delivery.
- An email provides the additional feature of managing your email. It provides you with the feature of file attachments, easy access to your contacts with the help of address book, adding reminders and many other features.
3.2 How Email Works
A sender creates a message and this message is stored in the Mail User Agent (MUA). MUA allows the originating sender to compose or read email. Once the message arrives in the MUA, it is transferred to the MDA (Mail Delivery Agent). The function of both MDA and MTA is to accept the mails and then routes it to local mailboxes or forwards it to any other location if local address is not available. The forwarded message from MDA to MTA then enters a network cloud. The network cloud consists of mail servers, DNS servers, routers and other devices. Some organizations have their own private network cloud in order to avoid the problem of heavy load or temporary unable to send or receive messages. The network cloud sends the mail messages to the sender MTA where it is placed in a queue and waits for its turn to be sent to the receiver MTA. After clearing the queue email enters the Internet network cloud from where it is routed to a chain of servers. In Internet network cloud next MTA is identified. The message when reached the MTA of the receiver the same process is repeated again and finally the message is transmitted to the receiver mail box.
3.3 Protocols Used For Email
In the world of communication the most important thing is to understand. In order to communicate with the two person or devices the major thing is to agree on the same language. If two people communicating with each other do not understand a common language they will never be able to communicate. Similarly in computer communication there needs to be a standard defined for communication. When computers communicate with each other, there should be a common set of rules and instructions that each computer follows. For this purpose there arises the concept of protocol.
"A protocol is a set of rules governing communication between electronic devices."
In order to exchange information between mail client and server a variety of protocols are used. Amongst them some major are defined as follows.
- IMAP ( Internet Message Access Protocol)
The Internet Message Access Protocol (IMAP) is a protocol used to access e-mail on a server. A client receives the email and is stored by the server. It allows quick accessing of a new message stored on the network. It gives the client the authority to create or delete message on the server.
There are three modes of accessing the messages store over the internet.
- In offline mode once the MUA receive message from the server it is deleted permanently from the server.
- In online mode messages received from the mail server remain there on the mail server until manipulated by the client.
- In disconnected mode MUA receives mail from the server but also makes a copy of the message.
Thus the online and disconnected modes left the mail on the server instead of deleting it which is helpful in that case when different computers are used to access messages at different time. Both the online and disconnected modes are fully supported by IMAP. This authorized the client to store the mail message on the server.
3.3.2 SMTP (Simple Mail Transfer Protocol)
SMTP is a push protocol that allows the client not to fetch messages from the server rather sending them on the desired location. The sending or receiving emails over the internet is possible due to this TCP/IP protocol. The SMTP client initiates a TCP connection to server's port 25. SMTP is a reliable and efficient way of transferring of mail.
188.8.131.52 SMTP Design
When the client request the server for the mail a two way transmission channel is established between sender and receiver SMTP. The sender receives the commands from the receiver.
The sender sends the mail and if the recipient is able to accept the mail “OK” is returned to the sender, hence confirming the successful transmission. Next is to identify the recipient of the mail. This is done by sending the RCPT command to the receiver. If the recipient is identified by the receiver OK command is send again otherwise a recipient is rejected by the receiver. Once the sender and receiver have been negotiated with each other the connection is terminated.
SMTP Commands/ Replies
184.108.40.206 SMTP Commands 
SMTP is used to send mail. Therefore before sending mail one should have some knowledge about the contents of the mail. This includes the person to whom the message is send, the person who is sending the message and what the message actually is. After knowing this entire information message can be send. Now in order to send mail there is a need to connect with the server and this can be done with the SMTP commands. SMTP commands are a sequence of commands used to send mail and to communicate with the mail server. These commands are not case sensitive i.e. both upper case or lower case letters can be used.
220.127.116.11.1 HELLO or Extended HELLO
These commands are used to identify client to the SMTP server. A domain name is also specified by the client. The client/user uses this command to initiate a conversation with the mail server. If connection is established successfully a greeting response is send otherwise failure message or error response is received. Both HELO and EHLO commands can be used to send mails but EHLO is the most recent in use, HELO was used earlier. EHLO indicates that the client is requesting for extended SMTP (ESMTP) protocol. If the EHLO command is not accepted by the server the replies send to the receiver are as follows:
On Success: 250 On Failure: 504, 550
On Success: 250 On Failure: 504, 550
This command identifies the sender of the mail. Its syntax is
MAIL FROM: <anyemailID@server.com>
Any error will report the following replies
On Success: 250
On Failure: 552, 451, 452, 550, 553, 503
This command identifies the recipient of the message to whom mail is delivered. Syntax for this command is
RCPT TO: <anyemailID@server.com>
Replies send by the receiver are as follows
On Success: 250, 251
On Failure: 550, 551, 552, 553, 450, 451, 452, 503, 550
The client sends this command to initiate the transfer of message content. A stream of data is send to the server. And is terminated by "." on a line. The message text must end with the following five letter sequence: "\r\n.\r\n." The receiver normally sends a 354 response to DATA.
On Success: 250On Failure: 552, 554, 451, 452
This command is used to get response from a server.
ii) Connection established
Send reply (220 OK)
iv) Receive EHLO send reply
b) Receive QUIT command
Send reply (221 OK)
i) Establishing connection with the server
iii) Send EHLO(or HELO) to start
v) Receive OK
a) Transfer done
Send QUIT command
c) Receive goodbye
Figure 3-3: SMTP Sender Receiver Communication
The QUIT command terminates an SMTP connection. The receiver does not close the connection until it receives the QUIT command and send reply to it. Similarly, a server does not close connection until it sends a QUIT command and receives the reply. The receiver successfully terminates if it sends 221 to the sender.
3.3.3POP3 (Post Office Protocol)
POP3 is a standard protocol to receive mail from the server. As soon as the client downloads the mail the mail is deleted from the server. It is easier to use but is not flexible. The pop3 service is listened on the port 110.
18.104.22.168 Functions of POP3
In order to start a conversation with the server client first established its connection with the server. Once the connection is established a greeting is send from server to the sender.
A POP3 session has three states
The first step after establishing a connection with the server is to send a greeting to the sender. Greeting the sender allows the pop session to enter the AUTHENTICATION state where the client is identified by the server. The second step is to enter the TRANSACTION state. In this state the client performs the actions requested by the client. Thirdly when client sends the QUIT command it enters the UPDATE state. In this state the server terminates and the connection is closed for further transmission.
22.214.171.124 POP commands 
In POP3 the communication between POP server and client is done through the commands. The POP commands are case sensitive. Of the following commands the USER, PASS and QUIT commands are the commands valid in AUTHERIZATION state, the RETR, DELE and QUIT commands are valid in TRANSACTION state and the QUIT command is valid in UPDATE State.
Operation on messages received from sender
Deleting any marked message
Disconnecting from server
126.96.36.199.1 USER(Username) This command is used to provide with the user identity. It should me anything name or number not necessarily the email.
188.8.131.52.2 PASS(Password) The USER command is followed by the PASS command. The user should provide with the password of its email account.
184.108.40.206.3 RETR (Retrieve)
This command retrieves the message the user is trying to read.
220.127.116.11.4 DELE (Delete)
The DELE command deletes the desired message from the server.
18.104.22.168.5 RSET (Reset)
In a session RSET command is used to unmark all the messages marked for detection.
The QUIT command is the last command for the pop session. After the execution of this command the client disconnects from the mail server.
- Internet E-Mail Format
The format of internet mail can be found in RFC 822 which defines the standards of text-based email messages. According to this RFC, message is composed of two parts; an envelope and contents.
The envelope constitutes the information that is needed for transmission and delivery while the content defines the data that has to be transmitted or delivered.
Internet message is composed of headers and a body. A header consists of field name and field body. For example, “To : <firstname.lastname@example.org>”, here ‘To' is the field name and ‘email@example.com' is the field body.
The header fields can occur in any order but the resent fields are added at the end.
3.4.1 Sender Date Field
Date: It defines the date and time of message origination
22.214.171.124 Sender Fields 
Following fields are used on the sender side:
from: Author's id
sender: This field is present if the author and sender are not the same
reply-to: This field specifies the id at which reply can be sent. It is different than that
given in the ‘from' field . If not mentioned it is set to the id mentioned in
‘from' field by default
126.96.36.199 Recipient Fields 
On the receiving side some of the fields are:
to: id of the crucial recipient
cc: the recipients mentioned in carbon copy field will receive the message but it
won't be directed towards them
bcc: the recipients in this field are not visible to those in ‘to' and ‘cc' fields
188.8.131.52 Other Fields
Message-id: This field acts as a message identifier
Subject: This field is understandable by humans and is visible to users. This
actually tells about the topic of message
184.108.40.206 Resent Fields 
‘Resent fields' are added to a message if the message is resubmitted to the mailing system. Each time this resubmission is done, each time a set of resent fields get incorporated into the electronic mail message.
‘Resent-Date', ‘Resent-to', ‘Resent-from' etc. fields are added every time when the message is resubmitted or reintroduced into the transport system.