MIME Basic Structures and Headers
(Page 3 of 4)
Primary MIME Headers
The first of the five main MIME standards, RFC 2045, describes a set of five primary MIME headers that communicate basic information about the content of each MIME entity (message or body part).
Each MIME message is required to have a MIME-Version header, which serves two purposes. First, it identifies the e-mail message as being MIME-encoded. Second, even though only one version of MIME has been defined so far, having a version number header provides future-proofing in case a new version is created later that may have some incompatibilities with the present one. Right now, all MIME messages use version 1.0.
This is the only MIME header that applies only to an entire message; it is not used to label individual MIME body parts. This is easy to remember as it is the only header whose name does not begin with Content-.
Describes the nature of the data that is encoded in the MIME entity. This header specifies a content type and a content subtype, which are separated by a slash character. It may optionally also contain certain parameters, that convey additional information about the type and subtype. In a message body, this header is what tells the recipient of the e-mail message what sort of media it contains, and whether the body uses a simple or complex structure. In a body part, it describes the media type the body part contains.
For example, a message containing an HTML document might have a Content-Type header of text/html, where a message containing a JPEG graphical file might be specified as image/jpeg. For a composite MIME type, the Content-Type header of the whole message will contain something like multipart/mixed or multipart/alternative, and each body part will contain individual Content-Type headers such as text/html or image/jpeg. These are all discussed in detail in the next two topics.
This header is optional. When not present, the default of a regular US-ASCII text message is assumed (the media type of regular RFC 822 messages).
For a message using simple structure, specifies the specific method that was used to encode the data in the message body; for a composite message, identifies the encoding method for each MIME body part. For data that is already in ASCII form, no special encoding is needed, but other types of data must be converted to ASCII for transmission. This header tells the recipient how to decode the data back into its normal representation. MIME encoding methods are described later in this section.
This header is optional; the default value if it is not present is 7bit encoding, which again is the encoding of regular ASCII.
Allows the MIME content to be assigned a specific identification code. This header is analogous to the RFC 822 Message-ID header field, but is specific to the MIME content itself. It is optional, and is most often used for body parts in multipart MIME messages.
This is an optional header that allows an arbitrary additional text description to be associated with the MIME entity. In a multipart message, each body part might be given a description header to make clear to the recipient what the parts represent.
Home - Table Of Contents - Contact Us
The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005
© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.