| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MIME Composite Media Types: Multipart and Encapsulated Message Structures (Page 5 of 6) Example Multipart Message Table 248 contains a specific example of a multipart message (with portions abbreviated to keep length down), so you can see what one looks like in text form. (If you want to see more, you probably have several in your own e-mail inbox right now!)
In this example, Joe is sending Jane a multipart message containing a JPEG photograph and some explanatory text. The main header of the message specifies the multipart/mixed type and a boundary string of exampledelimtext123. The message begins with the preamble, which is ignored by the recipient e-mail client but can be seen by the human reader. It is common to put a string here such as the one given in this example. That way, if a person using a client that does not support MIME receives the message, the recipient will know what it is. The first delimiter string is then placed in the message, followed by the first body part, the text Joe is sending Jane. This is preceded by whatever headers are needed by the body part, in this case Content-Type: text/plain. (Note, however, that this is the default in MIME, so it could be omitted here.) After the text message is another delimiter and then the encoded JPEG photo in the second body part, with its own headers. Finally, one more delimiter and then a space for the epilogue. This is ignored if present, and is often not used at all. It is possible to send a multipart message that has only a single body part. This is sometimes done to take advantage of the preamble area to provide information about how to decode a non-text media type. Of course, this can also be done by including such text decoding instructions as a body part.
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||