Signup/Sign In
PUBLISHED ON: APRIL 28, 2021

MIME Protocol

In this tutorial, we will be covering another Application Layer Protocol named MIME in computer Networks.

MIME is a short form of Multipurpose Internet Mail Extensions(MIME).

  • It is mainly used to describe message content types.

  • MIME is basically a supplementary protocol that mainly allows the non-ASCII data to be sent through E-mail.

  • It basically transforms the non-ASCII data at the sender site NVT ASCII data and then delivers them to the client in order to be sent through the Internet.

  • At the receiver side, the message is transformed back to the original data.

  • MIME is basically a set of software functions that mainly transforms the Non-ASCII data to ASCII data and vice-versa,

  • Following are the different kinds of data files that can be exchanged on the Internet using MIME:

    • audio

    • images

    • text

    • video

    • Other application-specific data(it can be pdf, Microsoft word document, etc).

  • MIME is one of the applications of Email and it is not restricted only to the textual data.

Let us take an example where a user wants to send an Email through the user agent, and this email is in a non-ASCII format. So here we use the MIME protocol that mainly converts this non-ASCII format into the 7-bit NVT ASCII format.

The message is transferred via email system to the other side in the 7-bit NVT ASCII format and then again the MIME protocol will convert it back into the Non-ASCII code. at the receiver side so that receiver can read it.

At the beginning of any email transfer basically, there is an insertion of the MIME header.

Features of MIME

The features of the MIME protocol are as follows:

  1. MIME supports the character set other than ASCII.

  2. With the help of MIME, we can send multiple attachments in a single message.

  3. MIME also provides support for different content types and multi-part messages.

  4. It provides support of compound documents

  5. It also provides support for non-textual content in the email message.

MIME Header

The MIME header is mainly added to the original e-mail header section in order to define the transformation. Given below are five headers that are added to the original header:

  1. MIME-Version

  2. Content-Type

  3. Content-Transfer-Encoding.

  4. Content-Id

  5. Content-Description

1.MIME-Version

This header of the MIME mainly defines the version of the MIME used. The currently used version of MIME is 1.1.

2.Content-Type

This header of MIME is used to define the type of data that is used in the body of the message. In this, the content-type and content-subtype are just separated by a slash.

Basically, depending upon the subtype the header also contains other parameters:

Content-Type:<type/subtype;parameters>

Different types of data allowed by MIME are as follows:

Type Subtype Description
Text 1.Plain
2.HTML
1.Unformatted
2.In HTML Format
Multipart 1.Mixed
2.Parallel
3.Digest
4.Alternative
1.Body mainly contains the ordered parts of Different data types.
2.It is the same as above but there is no order.
3.It is similar to mixed subtypes where the default is message/RFC822.
4. These parts are different versions of the same message.
Message 1.RFC822
2.Partial
3.External-Body
1.The body is in the form of an encapsulated message.
2.The Body is a fragment of a Bigger Message.
3.The Body is a Reference to another Message.
Image 1.JPEG
2.GIF
1.The Image is in JPEG Format.
2.The Image is in GIF Format.
Video MPEG The video is in the MPEG Format
Audio Basic The Single-Channel encoding of the voice is at 8kHz
Application 1.PostScript
2.Octet-Stream
1.Indicates Adobe PostScript
2.Indicates General Binary Data(8-bit Bytes).

3.Content-Transfer-Encoding

This header of the MIME mainly defines the method that is used to encode the messages into 0s and 1s for transport.

Content-Transfer-Encoding:<type>

Type Description
7-bit It indicates NVT ASCII characters and short Lines.
8-bit It indicates Non-ASCII characters and short Lines.
Binary It indicates Non-ASCII characters with unlimited-length lines.
Base-64 It indicates a 6-bit block of data encoded into the 8-bit ASCII characters.
Quoted-printable It indicates Non-ASCII characters that are encoded as an equal sign followed by an ASCII code.

4.Content-Id

This header of the MIME is used to uniquely identify the whole message in the multiple-message environment.

Content-id:id=<content-id>

5. Content-Description

This header of the MIME defines whether the body is in the form of image, audio, or video.

Content-Description:<description>

Advantages of MIME

Some benefits of using MIME are as follows:

  • Supports Interactive Multimedia.

  • Supports the transfer of Multiple attachments.

  • Supports different content types.

  • Also supports text with different fonts and colors.



About the author:
Aspiring Software developer working as a content writer. I like computer related subjects like Computer Networks, Operating system, CAO, Database, and I am also learning Python.