Partager via


MIME Message Format

The Multipurpose Internet Mail Extensions (MIME) specification enables the exchange of messages with more complex content than RFC 822.

The body of a MIME-formatted message is subdivided into body parts. Body parts contain parts of a message for example an image, a spreadsheet, text formatted using HTML, an alternate representation of the message text, a sound file, or an executable program. The MIME specification also defines additional mail header fields to describe aspects of each message body part. The MIME header fields enable you to do the following:

  • Specify the type of content within the body part, such as an image, an application file, an executable program, and so on.

  • Specify the class of content within the body part. For example, a Microsoft® Word document attachment would be of the type application/msword, but its purpose or class could be an expense report or a specification. Distinct from the type of content, the class defines the intent or purpose of the content.

  • Specify the encoding for each content part when encoding is necessary for example, in a binary file.

  • Specify a character encoding other than United States (US) ASCII for each separate text body part.

  • Specify the intended disposition of a body part, for example, inline or attachment.

  • Specify a base Uniform Resource Identifier (URI) for resources referenced in HTML content.

Body parts can be organized into groups formed in a hierarchy. With this hierarchy, you can relate multiple body parts in the body of a message. For example, you can indicate that a body part consists of the following:

  • Multiple representations of the same message, such as plain text, HTML, and audio.

  • Multiple parts with related resources that are to be assembled when displayed to the reader. For example an HTML page that consists of HTML, images, style sheets, frames, JavaScript files, and so on.

  • Multiple parts that vary in purpose, some being alternate representations, some attachments, and some groups of related resources.