Multipurpose Internet Mail Extensions (MIME)

MIME is an email standard defined by RFC 2045-2049 to handle the limitations of RFC 5322# mainly over non-ASCII character sets and non-textual attachments. Apart from inheriting the electronic mail structure from RFC5322, it extends the e-mail to support the following options:

  • MIME-Version, which is usually 1.0
  • Content-Type which describes the data contained in the body
  • Content-Transfer-Encoding which define the encoding method of the message
  • Content-ID which unique identifies character strings in multiple context
  • Content Description which describes the content if it is not readable

Common Content-Type can be found in MDN Web Docs.

An example of a MIME e-mail is shown below.

From: Little Clover <littleclover909@gmail.com>
To: Ned Freed <ned@innosoft.com>
Subject: Example
MIME-Version: 1.0
Content-type: multipart/mixed; boundary="simple boundary"

This is the preamble. It is to be ignored, though it is a handy place for mail
composers to include an explanatory note to non-MIME conformant readers.
--simple boundary

This is implicitly typed plain ASCII text. It does NOT end with a linebreak.
--simple boundary
Content-type: text/plain; charset=us-ascii

This is explicitly typed plain ASCII text. It DOES end with a linebreak.

--simple boundary
This is the epilogue. It is also to be ignored.
Links to this page
  • Secure/Multipurpose Internet Mail Extensions (S/MIME)

    S/MIME is an extension to the existing MIME# email infrastructure focus on security enhancements in Application Layer# which is supported in many mail agents such as MS Outlook, Mozilla, Mac Mail etc. It is similar to Pretty Good Privacy (PGP) which offers ability to sign and/or encrypt messages. The public keys are distributed in the form of Public-Key Certificate# which both parties have to obtain the cert.

  • RFC 5322

    However, it has several limitations. It doesn’t recognised other character encoding schemes other than ASCII, non-textual data such as image and audio, and long lines (72 to 254 characters). Furthermore, it may reject the message if it exceeds a certain size. Although there are many schemes that could be used to transmit executable or binary files within RFC 5322’s boundary, none of them is the standard. Therefore, it was replaced by #Multipurpose Internet Mail Extensions (MIME) as the standard for mail structure.

#graphics