MIME (Multipurpose Internet Mail Extensions)

Multipurpose Internet Mail Extensions (MIME)

MIME stands for "Multipurpose Internet Mail Extensions" and allows messages that are not formatted in ASCII to be transferred over the Internet MIME provides extensions, allowing some new uses electronic mail, messages now may have:

  1. Multiple objects within a single message
  2. Text with unlimited length or overall length
  3. Character sets other than 7 -bit ASCII Multi-font messages
  4. Binary or application-specific files
  5. Images,audio,video and multi-media messages

Common MIME Types:

  1. text/plain
  2. text/html
  3. image/jpeg
  4. image/gif
  5. application/octet-stream
  6. audio/midi
  7. audio/x-midi
  8. application/ps

MIME defines the following new header fields:
MIME-Version, which uses a version number to declare that a message conforms to the MIME standard
Content-Type, which can be used to specify the type and subtype of data in the body of a message and to fully specify the encoding of such data. It includes also a sub-type option. Seven content types specified are:

  1. Text - To represent textual information in a number of character sets
  2. Image - For transmitting still image (picture) data
  3. Audio - For transmitting audio or voice data
  4. Video - For transmitting video or moving image data
  5. Message - For encapsulating a mail message
  6. Multipart - To combine several body parts possibly of different types of data, into a single message
  7. Application - To transmit application data or binary data

Content-Transfer-Encoding:

Specifies how the data is encoded to allow it to pass through mail transfers having data or charset limitations. It is an optional field. It enables labeling bodies, thus allowing one body to reference another

Content Description(optional):

It enables associating descriptive information within a body


The server has a response header named Accept-Type which is a comma separated list of MIME Types.
For example, Accept-Type: image/*,text/html will accepts only files that have HTML markup or any types of images (Denoted by *).
If any other MIME type of file is sent by the client to the server, the sever returns a response with an error code or redirection if it is specified by the server settings


  • MIME decodes binary data so that it can be passed over the internet(New Binary encoding scheme called BASE64 is used)
  • MIME labels encoded data so that the "content" can be properly understood at the end (New SMTP headers describe the attached document and User agents read the headers to figure out how to interpret the message).

Comments

Popular posts from this blog

XPath for HTML markup

Apache Hadoop | Running MapReduce Jobs

Laravel | PHP | Basics | Part 2