Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide

NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Enjoy The TCP/IP Guide? Get the complete PDF!
The TCP/IP Guide

Custom Search

Table Of Contents  The TCP/IP Guide
 9  TCP/IP Application Layer Protocols, Services and Applications (OSI Layers 5, 6 and 7)
      9  TCP/IP Key Applications and Application Protocols
           9  TCP/IP File and Message Transfer Applications and Protocols (FTP, TFTP, Electronic Mail, USENET, HTTP/WWW, Gopher)
                9  TCP/IP Electronic Mail System: Concepts and Protocols (RFC 822, MIME, SMTP, POP3, IMAP)
                     9  TCP/IP Electronic Mail Message Formats and Message Processing: RFC 822 and MIME
                          9  TCP/IP Enhanced Electronic Mail Message Format: Multipurpose Internet Mail Extensions (MIME)

Previous Topic/Section
MIME Basic Structures and Headers
Previous Page
Pages in Current Topic/Section
Next Page
MIME Composite Media Types: Multipart and Encapsulated Message Structures
Next Topic/Section

MIME Content-Type Header and Discrete Media: Types, Subtypes and Parameters
(Page 1 of 5)

MIME transforms TCP/IP e-mail from the drab, text-only world of RFC 822, to a rich communication method that can carry many types of data. It accomplishes this by using special techniques to encode various kinds of information into ASCII text form, such as graphical images, sound files, video clips, application programs, compressed data files, and many others. We commonly refer to these as different types of media, and MIME uses the same term to describe them.

Since MIME supports so many kinds of media, it is necessary that each message contain information that describes what it contains, to permit accurate decoding of message contents. This is the function of the important MIME Content-Type header.

Content-Type Header Syntax

The syntax of the header is as follows:

Content-Type: <type>/<subtype> [; parameter1 ; parameter2 .. ; parameterN ]

The purpose of these different elements is to describe the media in the MIME entity in a way that proceeds from the general to the specific. The first element, “<type>”, is called the top-level media type and describes the overall form of the data. For example, it indicates if the MIME entity contains text, an image, audio and so forth. The second element, “<subtype>”, provides specific information about the form or format of the data. For example, a JPEG image and a GIF image are both images, but they are in a different format. Both “<type>” and “<subtype>” are mandatory in the Content-Type header.

Following these elements may appear one or more parameters, which are usually optional but may be required for some media types. These provide still more detailed specification of the nature of the data, when it is required. Each parameter is preceded by a semi-colon and is expressed as an attribute/value pair, separated by an “=” sign, like this:

; attribute=value

One example of how parameters may be used is in specifying the character set in a text message. The representation of “regular” RFC 822 ASCII text is as follows:

Content-type: text/plain; charset=“us-ascii”

The top-level media type is “text”, and the subtype is “plain”, so this indicates a plain text message. The parameter “charset” specifies that the message uses the US ASCII character set. Another common use for parameters is to specify the name of an attached file, like this:

Content-type: image/jpeg; name=“ryanpicture.jpg”

Previous Topic/Section
MIME Basic Structures and Headers
Previous Page
Pages in Current Topic/Section
Next Page
MIME Composite Media Types: Multipart and Encapsulated Message Structures
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $

Home - Table Of Contents - Contact Us

The TCP/IP Guide (
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.