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.