[EdCert previous] [EdCert next] [EdCert top]

Multipurpose Internet Mail Extensions (MIME)

MIME is a protocol that facilitates a way to interchange text in languages that have different characters sets and multi-media email between different systems. MIME allows email messages to contain:

Prior to MIME, it was possible insert sounds and images in email messages, but the programs available to do this were vendor specific. Because MIME is a protocol, rather than depending on a particular vendor it relies on Internet mail standards. MIME allows message parts to be labeled so that the mailer and whoever receives them knows what to do with them.

MIME uses three header fields in the header of the mail message to let the mailer know what MIME types the message contains. The header from a MIME message on MH looks like:

     To: fardnocker
     Subject: Buebelah!
     Fcc: outbox
     Reply-to: foo@indiana.edu
     MIME-Version: 1.0
     Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
     Content-ID: <24262.814632719.0@outland.ucs.indiana.edu>

The MIME-Version header field lists the version of MIME being used. The Content-Type header field specifies the type and subtype of the data contained in the message. The type is stated first, followed by a forward slash and the subtype. There are seven pre-defined types. Each of which supports one or more subtypes. The seven types are:

text
This indicates that the message contains some sort of text. and is the default content type. The most common text subtype is plain, which is used to indicate unformatted text.
multipart
Multipart messages contain several parts, each with a different type of data. There are four subtypes:
message
This indicates an encapsulated message.
image
This is used if the message contains still images. The subtypes are the names of image formats.
audio
This indicates that the message contains a sound file of some sort.
application
This is used for some form of data not specified by the other types. This can include uninterpreted binary data, or information that is meant to be processed by a mail-based application.

A complete list of types and corresponding subtypes is available in either table or text format.

The Content-ID, or Content-Transfer-Encoding header field has to do with how the body of the message is transformed, so that is represented in a way that can be transported. Many of the content types that MIME supports are normally represented as binary or 8-bit character data. RFC 821 states that mail messages must be restricted to 7-bit US-ASCII data with a maximum line length of 1000 characters. So this header field indicates what type of transformation was required to put the contents of message body in this format.

Receiving and sending MIME messages involves being able to encode and decode them. This requires either an independent program capable of performing this function, or the use of a mailer that supports MIME. A couple of the more common independent programs are mpack, munpack, and Metamail. mpack and munpack are utilities for encoding and decoding binary files in MIME messages. Metamail is a package of utilities for handling MIME messages. Many email programs use metamail. For more optional information on metamail, see the README file.

There are several common Unix mailers that support MIME. They include:

MH
To use MH with MIME, MH must be configured to use mhn. mhn is a helper program for MH.
exmh
exmh is a Tcl/Tk GUI front end for MH that supports MIME.
mail
mail can be configured to use metamail to read MIME messages.
pine
The pine mailer has the native ability to handle MIME messages. For optional information on using MIME in pine see In Pine, how do I attach a file to an e-mail message?
elm
MIME messages are supported under elm, but to a lesser degree than they are under other Unix mailers. elm uses the metamail program to read all MIME messages, even if they don't require special processing.

For further optional information on MIME see RFC 1521 and RFC 1522.


Terms used: MIME, postscript, ASCII, RFC, Tcl, Tk




[EdCert previous] [EdCert next] [EdCert top]