The following subjects will be describe in more details in this section:
Implementors
are advised to consult the official documentation:
MIME defines the following new header fields:
Used to declare the version of the current Internet message body format standard. This header field must include text of the format:
MIME-version: 1.0
(At the time these words were being written the MIME version was "1.0".)
The MIME-version header field is required at the top level of a message. It is not required for each body part of a multipart entity.
The official updated list of MIME Content-Types is available in the IANA assignments list.
The syntax for the content type header is:
Content-Type := type "/" subtype [ ";" parameter ]
The 7 Content-types defined in MIME are:
The subtype mechanism was defined in order to enable many more types, while leaving the readers a good prospect of recognizing the content-type.
Following are the subtypes defined for each of the main Content-types:
Many Content-types are represented as 8-bit character or binary data. Such data cannot be transmitted over some transport protocols.
This header field is used to indicate the type of transformation that has been used for re-encoding such data into 7-bit short-line format, in order to represent the body in an acceptable manner for transport.
The possible values defined for this field are:
Each encoding method is briefly described as:
Imply an encoding that consists of lines no longer than 76 ASCII characters. Suited for representing binary files. Any sequence of three bytes is represented as four printable ASCII characters.
The encoding scheme implied by this value is most appropriate for data that consists primarily of printable ASCII characters. Using this encoding method, printable ASCII characters are represented as themselves. The encoding consists of lines no longer than 76 ASCII characters.
The lines are short, but there may be non-ASCII characters.
The data is all represented as short lines of US-ASCII data.
Allows for non-ASCII characters and longer lines (i.e., the lines might not be short enough for SMTP transport).
In order to define private Content-Transfer-Encoding values it is possible to use the special X-token mechanism, in which the private encoding type name is prefixed by "X-" to indicate its non standard status.
These two header fields are optional.
The optional Content-ID header field may be desirable to allow one body to reference another. The value may be used for uniquely identifying MIME entities in several contexts.
The optional Content-Description header field gives the ability to associate some descriptive information with a given body.
The multipart message is one of the important extensions of MIME relative to the original RFC 822.
This content-type is to be used to pack several parts, of possibly differing types and subtypes, into a single RFC 822 message body.
The Content-type field specifying type multipart also includes a delimiter (boundary), which is used to separate each consecutive body part. Each body part is itself structured more or less as an RFC 822 message in miniature - in particular, possibly containing its own Content-type field to describe the type of the part.
An expected use of subtypes of multipart is to add further structure to the parts, to permit a more integrated structure of multipart messages among cooperating user agents.
You can see a multipart message example in the "examples" part.
A technique to allow the encoding of non-ASCII text in various portions of a RFC 822 message header, in a manner which is unlikely to confuse existing message handling software, is described in RFC 1522 - "MIME Part Two: Message Header Extensions for Non-ASCII Text".
The chosen technique is based on certain sequences of "ordinary" printable ASCII characters (known as "encoded-words") being reserved for use as encoded data.
Generally, an "encoded-word" is a sequence of printable ASCII characters that begins with "=?", ends with "?=", and has two "?"s in between. It specifies a character set and an encoding method, and also includes the original text encoded as graphic ASCII characters, according to the rules for that encoding method.
A mail composer that implements the RFC 1522 specification will provide a means of inputting non-ASCII text in header fields, but will translate these fields into encoded-words before inserting them into the message header.
A mail reader that implements the specification will recognize encoded-words when they appear in certain portions of the message header. Instead of displaying the encoded-word "as is", it will reverse the encoding and display the original text in the designated character set.