Email Protocol: SMTP, POP, and MIME

Modified: 5th Apr 2018
Wordcount: 2358 words

Disclaimer: This is an example of a student written essay. Click here for sample essays written by our professional writers.
Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of UKEssays.ae.

Cite This

Email protocol governs the interactions between email clients and servers. An Email protocol is a standard method which is used at each end of a communication channel either server side or client side, in order to transmit information properly. User is required to use a mail client to access to the mail server, by using variety of email protocols, the mail client and server can only exchange their information with each other. Three examples of Email protocol are:

  1. Simple Mail Transfer Protocol (SMTP)
  2. Post Office Protocol(POP)
  3. Multipurpose Internet Mail Extensions(MIME)
  1. Simple Mail Transfer Protocol(SMTP)

Simple Mail Transfer Protocol (SMTP) transmits electronic mail (email) within different hosts in the Department of Defense Internet protocol suite. Email servers and other mail transfer agents use SMTP to send and receive messages, while SMTP usually used by client side’s email application to send messages to the email server for relaying only. For receiving messages, client side would mostly use POP protocol which will be introduced at the next part. Examples of email client that used SMTP to send messages are webmail systems: Hotmail, Gmail and also Outlook, Microsoft Exchange and so on. SMTP listens on TCP protocol well-known port 25.

Functions of SMTP:

To enable the client side to send email message to a receiver (an email address which already exist), SMTP would perform the following functions:

  1. User authentication
  • To verify the sender who is using SMTP server to send an email message has the right to do so.
  1. User notification
  • After delivering the message to the destination, SMTP will check whether the message has been successfully delivered.
  • If the message does not delivered successfully, SMTP notifies sender by using an error messages and the message that was not successfully delivered will be delivered back to the sender.

Advantages of SMTP:

  1. Simplicity

SMTP is the simplest way to send an electronic mail between various computers in a particular network. As long as there is a receiver destination and a sender who send the message, the message will be send to the destination. The message will pass through a simple process from SMTP server to an exchange server for the receiver’s computer.

  1. Quick Email Delivery

As we known SMTP is the simplest way to transmit a message, email messages can be sent quickly and easily by using SMTP. As long as the condition of the mail server is good, the messages that are sent will reach to the recipients as quick as possible.

  1. Reliability

When the message has failed to deliver, an error message will be sent to inform the sender and the message that failed to deliver will be sent back to the sender. In this case, sender doesn’t have to worry that the message send will failed to delivered, because when the message is failed to delivered, sender can choose to resend the message until the message is finally delivered to the recipient successfully.

Limitation of SMTP:

  1. Additional administrative overhead

Original SMTP identifies clients by using the IP addresses, but it is only available when the email services are provided by the same Internet server provider that supplied the connection. Therefore, an extension named” SMTP-AUTH” is required to verify the senders of the messages.

  1. Required to set up security
  2. Required expertise
  1. Post Office Protocol(POP)

Post Office Protocol (POP) is a Internet standard protocol in the application layer which allows email clients to retrieve email messages from a remote mail server. Out of the versions of POP that has been developed, current standard which used in most of the client and server email communication architecture is version 3 of POP also written as POP3. POP3 server listens on TCP protocol well-known port 110. It uses the TCP/IP protocol stack for network connection and works with SMTP for end-to-end email communication. In this case, POP is responsible to “pull” the messages from the server and SMTP will “push” the messages to the server.

Function of POP:

  1. Retrieve message from an ISP and whether to delete or not to delete it on the server, depends on users’ decision.
  2. Detect whether new message has arrived but not retrieving it from the server, meaning the messages will be stored at the server until the user choose to retrieve it from the server.
  3. To see whether the message is worth retrieving, POP will peek at the few sentences of the message before retrieving it.

Advantages of POP:

  1. Once the messages have been retrieved to the client computer, it is visible with or without the internet connection including the attachment along with the message.
  2. User can choose whether to delete or not to delete the messages that already retrieved from the server.
  3. User can choose to save a copy of some of the important messages by choosing not to delete the messages from the POP server.

Disadvantages of POP:

  1. Occupied a lot of hard disk spaces in computer as the email retrieved from the server are all store into the hard disk storage.
  2. Not accessible from other machine. Nowadays, people uses multiple devices to access to one email account, but not with POP, all messages are downloaded into one and only one PC. In order to read that specify message, user can only use the PC which used to download the messages to view it.
  3. Messages stored at local disk drive are vulnerable to data loss or even security threats. As those messages stored at local disk are deleted from the server and stored at only one PC at a time, it is more dangerous when the PC suffered virus attack or data corrupted.
  1. Multi-purpose Internet Mail Extension(MIME)

MIME is an extension which allows users to use the protocol to send different kinds of data files on the Internet, for example: audio file, image file (PNG, GIF, JPEG), video or even application programs. SMTP protocol only handled ASCII text, which means, only ASCII texts can be send through the protocol. Media type of content in email is described by MIME type, some of the examples for MIME types are:

  • Plain text: txt/plain
  • Java applets: application/x-java-applet
  • Adobe PDF documents: application/ pdf

Advantages of MIME:

  1. Allows mail messages consists not only ASCII text.

Old version of Internet email standard allows only ASCII characters messages, messages not exceed 1000 characters and so on. But with MIME, it allows additional fields for mail message by using the MIME headers that describe new types of content and organization for messages.

MIME allows mail messages to consist of the following:

  • Multiple objects in a single message.
  • Unlimited length text messages.
  • Other than ASCII characters, it also allows non-English messages.
  • Message that consist multiple types of font.
  • Application specify or even binary files.
  • Audio, Image, Video and other multimedia attachment in the mail message.
  1. MIME header can help client PC to search for the suitable application software to open the attachment or file include in the mail messages.

Disadvantages of MIME:

  1. Some compound formats are considered as an application when they are nor for example “application/pdf”.

Diagrams below show how client and server send and retrieve messages via SMTP and POP protocols, also how the multipurpose internet mail extension works:

pop smtp.gif mime.JPG

How to apply the following email protocols (SMTP, POP, MIME) with ASP.NET?

One way to apply the mentioned email protocols with asp.net is using System.Net namespaces. It consists of classes that provide simple programming interface for several number of network protocols, compose Email and send it, it also consist of representation of multipurpose internet mail exchange (MIME) headers. Besides, it also can access to network traffic data and peer-to-peer networking function.

SMTP

Inside System.Net, there is a namespace called System.Net.Mail, it contains classes that we needed which is to send email messages to a simple mail transfer protocol (SMTP) server for it to be delivered. Classes include in this namespaces are for example: an Attachment class which allowed user to add an attachment into the email, MailMessage class represents the email message that can be sent by using the SmtpClient class, while there is also a class which allowed user to send an email by using the SMTP.

List of all the classes in System.Net.Mail namespace will be included in Appendix A.

To actually send an email using SMTP, we will require these following items:

  • The SMTP host server that we use to send email.
  • A port number, which usually we use port number25.
  • User name and password for authentication purpose.
  • An email address of sender and recipients.
  • The message content.

Once we have accessible SMTP server, it is time to send our email message! Firstly we will need to create an empty page which consists of the example coding shown:

email.JPG

Next we can choose to send the email to more than one person at a time, by adding email address to the “To” collection as shown below:

to.JPG

After that we can set the name of the sender, this will be shown along with the sender email address to the recipient once the email has been received. For instance, we can do this:

setname.JPG

Next, we can use the CC and BCC fields in the email messages, for example:

ccbcc.JPG

Other than that, we can also set priority of an email message, by using one of the method provided in the System.Net.Mail class:

priority.JPG

POP

To log in to a POP server, we need to use System.Net.Sockets namespace. Classes that we can use from the System.Net.Sockets namespace are for example TcpClient and NetworkStream.

Firstly, we will need a simple aspx page which consists of several textfields that allow user to enter the username and password.

pop1.JPG

To initiate the connection to POP3 server, we will use the System.Net.Sockets. For example, after user enter their username and password, and then there is a on click event of the button as shown in the following header:

pop2.JPG

Next, we will send the username and password to the server, and the server response will be displayed:

pop3.JPG

If the username and password are valid and successfully verified by the POP server, we will get a response and then start to retrieve a list of messages from the server. We will request for using the LIST command and display each message that we loop through:

pop4.JPG

At last, we need to close the connection to the server. In this case, QUIT command has come to use, and then server response will be display:

pop5.JPG

MIME

Similar with implementing SMTP into asp.net, we can use the classes within System.Net.Mail namespace to apply MIME into asp.net. There is one namespace called System.Net.Mime which holds the types that used to represent MIME headers. These types are use along with the types in System.Net.Mail namespace when a SmtpClient class send an email with attachment. Data of MIME is represented by Attachment class which we just mentioned in the System.Net.Mail part. Here are some example of classes included in the System.Net.Mime:

Class

Description

ContentType

This represents a Content Type header in MIME protocol.

MedisTypeNames

Media type information for the attachment included in an email message.

MediaTypeNames.Image

This will specifies the type of image file attached into an email message, for example, .png, .jpeg and so on.

For the full list of classes included in System.Net.Mime, please refer to Appendix B.

 

Cite This Work

To export a reference to this article please select a referencing style below:

Give Yourself The Academic Edge Today

  • On-time delivery or your money back
  • A fully qualified writer in your subject
  • In-depth proofreading by our Quality Control Team
  • 100% confidentiality, the work is never re-sold or published
  • Standard 7-day amendment period
  • A paper written to the standard ordered
  • A detailed plagiarism report
  • A comprehensive quality report
Discover more about our
Essay Writing Service

Essay Writing
Service

AED558.00

Approximate costs for Undergraduate 2:2

1000 words

7 day delivery

Order An Essay Today

Delivered on-time or your money back

Reviews.io logo

1856 reviews

Get Academic Help Today!

Encrypted with a 256-bit secure payment provider