MIME in computer networks stands for Multipurpose Internet Mail Extensions. MIME is an extension of its parent protocol i.e. SMTP (Simple Mail Transfer Protocol). MIME protocol is not restricted to textual data only. With the help of the MIME protocol, we can send various types of data through the internet such as text, images, audio, videos, etc. The main usage of the MIME protocol in computer networks is to describe the content types of messages. At the sender’s end, the ASCII and non-ASCII data is converted into a 7-bit NVT ASCII data and then delivered the data to the respective client over the internet.
What is MIME?
Before learning about the MIME protocol, let us first get a brief understanding of the ancestor of the SMTP or Simple Mail Transfer Protocol.
As the name suggests SMTP is a protocol (set of rules and regulations) that deals with the sending and receiving the e-mails over the Internet. It is one of the most valuable protocols that is widely used in email communication. Email communication involves two things i.e. sending the email (PUSH
) and receiving the email (POP
). The PUSH operation is dealt with by the SMTP protocol and the POP operation is handled by the IMAP protocol i.e. Internet Message Access Protocol. The SMTP protocol is a part of the Application layer protocols in the TCP/IP Model Suite. The SMTP protocol server is always in listening mode so whenever a client wants to send a message, the SMTP initiates the process on the default port i.e. $25$. Now once the connection is successfully established, the client can send the emails instantly. To learn more about the SMTP protocol, please refer to the article – SMTP Protocol – Scaler Topics.
MIME in computer networks stands for Multipurpose Internet Mail Extensions. MIME is an extension of its parent protocol i.e. SMTP which was developed by Bell Communications (by Nathan Borenstein)
in the year 1991
whose aim of the development was to extend the limited capabilities of email. SMTP does not allow the sending of non-ASCII data but the MIME protocol is a supplementary or an add-on protocol that allows us to send non-ASCII data over email. The MIME protocol is not restricted to textual data only. With the help of the MIME protocol, we can send various types of data through the internet such as:
- text
- images
- audio
- video
- application programs like Word document, pdf, etc.
The main usage of the MIME protocol in a computer network is to describe the content types of messages. At the sender’s end, the ASCII (American Standard Code for Information Interchange) and non-ASCII data are converted into a 7-bit NVT ASCII (The Network Virtual Terminal (NVT) ASCII
character set) data and then delivered the data to the respective client over the internet. When the message is received at the receiver’s end, the data is again transferred to its original format. So, we can visualize the MIME protocol as a set of software functions that transforms the ASCII data to the non-ASCII data and vice-versa.
Refer to the diagram provided below for more clarity.
Note: Currently the MIME protocol is used by email service companies like Gmail, Hot-mail, and Yahoo-mail.
Need for MIME Protocol
To learn about the need for the MIME protocol in computer networks let us first understand the drawbacks of the SMTP protocol that led to the development of the MIME protocol.
The SMTP protocol was developed in 1981 for message delivery over email. However, the original version of the SMTP protocol only supported the text communication of a 7-bit ASCII
value that was unencrypted and unauthenticated at the same time. As we know there are only $94$ printable characters in the ASCII values so the system was unable to deal with the binary files or the characters present in the non-English languages that use some different writing systems, accented letters, etc. This 7-bit ASCII data was not the only problem with the SMTP protocol, we were also unable to send video or audio data using the SMTP protocol.
SMTP was also not that secure because people could use the SMTP’s open server mail relay to send messages. These are some of the limitations that are why the use of SMTP led to various vulnerabilities like email spamming, email spoofing, man-in-the-middle (MitM)
attacks, etc.
Now because of these limitations of the SMTP protocol, MIME was developed as an extension of the SMTP protocol. As we have discussed earlier the MIME protocol can send various types of data like text, audio, video, and applications, as well as we can convert a non-ASCII value to an ASCII value and vice versa. Now the MIME protocol registers its data types with the Internet Assigned Numbers Authority (IANA)
.
Let us now briefly discuss some of the areas and scenarios where we need the MIME protocol.
- If we want to send the email in multiple languages like e-mail, such as Hindi, English, Chinese, French, Japanese, etc. then we can use MIME in computer networks.
- There is no size limit in the MIME protocol so we can send messages of large sizes as well but if we use the SMTP then there is a restriction on the size of the message.
- If we want to send audio, video, and images then we cannot use the SMTP protocol so we must use the MIME protocol for sending such data via email.
- For marketing purposes, many companies design their emails using HTML, CSS, etc. for innovative designs, so for sending such kinds of emails we use the MIME protocol.
Features of MIME Protocol
So far we have learned a lot about the MIME protocol, let us now look at some of the features of the MIME protocol.
- We can attach multiple attachments in a single mail using the MIME protocol.
- The MIME protocol can work with the non-ASCII protocol characters.
- The MIME protocol can work with various languages.
- We need not be worried about the length of the email if we are using the MIME protocol.
- We can even send non-textual inputs in our emails using the MIME protocol.
- We can send compound attachments using the MIME protocol.
- With the help of the MIME protocol, we can even send emails designed using HTML, CSS, etc.
Working on MIME Protocol
We can send emails with the MIME formatting using other protocols like SMTP, POP, and IMAP but the body of such kinds of email messages may contain multiple parts. For example, the header of the message can contain non-ASCII characters which are supported by the MIME protocol. We will be learning about the various headers of the MIME protocol developed by the IETF’s RFC 2045 that are used to describe the structure of the messages passed by the MIME protocol in the next section.
The created header is inserted by the server at the very beginning of the transmission of the email. Now, the selection of the appropriate player application to indicate the proper data type of the header is done by the client itself. Some of these players are already built into the web browsers and web clients which makes the work faster. For example, almost all web browsers come with JPG and GIF players and they can handle HTML files as well.
Now at the server’s end, the non-ASCII data is transformed into a 7-bit NVT (Network Virtual Terminal)
data. The 7-bit ASCII data
is capable of representing 128 characters. After this transformation, the transformed data is delivered to the respective SMTP client. At the receiver’s end, the transformed message is then converted back to its original format so that the user can see the actual content even though the message contains text, video, audio, etc.
Let us look at the overall working diagram of the MIME protocol.
MIME Header
In the previous section, we discussed the use of the MIME header, let us now discuss the header of the MIME protocol in detail. The very first question that comes to our mind is what is a header in message transfer? Well, a header is a content that is added at the start of the email to define the type of transformation and other information. The MIME header can be divided into 5 types of header or subparts, i.e. MIME-Version, Content-Type, Content-Transfer-Encoding, Content-Id, and Content-Description. Let us learn about them one by one.
Please refer to the image provided below to get a better understanding of the MIME header and its types.
MIME-Version
As the name suggests, the first field denotes the version of the MIME protocol. This field has a usual value of $1.1$ that indicates the message is being formatted using the MIME protocol.
Content Type
The content type section describes the type and subtype of the information or data that is to be sent over in the message. For example, the message can be a text, image, audio, video, or any other form of data. The subtype can be png or jpg or jpeg etc. in case of image type, mp4 or WEBM, etc. in case of video type, etc.
Now, the type and the subtype of the content are divided by a SLASH (/
) and the field denotes how the objects present in the body have to be executed. By default, the value of the content type is set to plaintext in US ASCII.
The format of the Content-Type header is:
Context-type: <type/subtype; parameters>
Content Type Encoding
As the name suggests, the Content-Type Encoding header subtype denotes the method that is used for encoding the message. Some examples of encoding techniques are 8-bit encoding, 7-bit encoding, binary, base-64, quoted-printable, etc.
Content Id
The content ID subtype is used to provide a unique ID to the content for easily unique identification. So, this helps us if we have multiple messages and we want to detect a certain message among the brunch of messages.
The format of the Content-ID header is:
Content-id:id=<content-id>
Content Description
The content description subtype is used to define the form of data that is present in the body for example image, video, audio, etc.
The format of the Content-Description header is:
Content-Description:<description>
Advantages of MIME Protocol
Let us now learn about some of the advantages of the MIME protocol in computer networks.
- The MIME protocol can work with interactive multimedia that is developed using HTML, CSS, etc.
- MIME protocol supports the transferring of multiple attachments.
- MIME protocol can send text having various fonts and colors.
- The MIME protocol also supports various types of multiple attachments.
- MIME protocol supports numerous languages.
- MIME protocol assigns a unique identifier or ID to all the emails for easy identification.
- The MIME protocol has no length boundary, unlike the SMTP protocol.
Conclusion
- MIME in computer networks stands for
Multipurpose Internet Mail Extensions
. MIME is an extension of its parent protocol i.e.SMTP (Simple Mail Transfer Protocol)
. - MIME protocol is not restricted to textual data only. With the help of the MIME protocol, we can send various types of data through the internet such as text, images, audio, videos, etc.
- At the sender’s end, the ASCII and non-ASCII data is converted into
7-bit NVT ASCII
data and then delivered the data to the respective client over the internet. - The main usage of the
MIME
protocol in a computer network is to describe the content types of messages. Currently, the MIME protocol is used by email service companies like Gmail, Hotmail, and Yahoo-mail. - We can visualize the MIME protocol as a set of software functions that transforms the ASCII data to the non-ASCII data and vice-versa.
- If we want to send the email in multiple languages like e-mail, such as Hindi, English, Chinese, French, Japanese, etc. then we can use MIME in computer networks.
- For marketing purposes, many companies design their emails using HTML, CSS, etc. for innovative designs, so for sending such kinds of emails we use the MIME protocol.
- The
MIME protocol
can work with non-ASCII protocol characters and various languages, and we need not be worried about the length of the email if we are using the MIME protocol. - The MIME header can be divided into 5 types of header or subparts, i.e. MIME-Version, Content-Type, Content-Transfer-Encoding, Content-Id, and Content-Description.
MIME protocol
has no length boundary unlike the SMTP protocol and it assigns a unique identifier or ID to all the emails for easy identification.