Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Internet Protocols Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

8.4 The MIME Package Representation of a Message

This section describes the structure of the MIME package representation of a message.

Figure 15 shows an informal diagram of a multipart message that contains single part MIME parts. Note that this diagram contains only the most important information. In particular, the diagram does not illustrate the details of the RWMimeHeader class.

Figure 15: MIME package representation of a multipart message

The message itself is represented as an instance of RWMimeMultipart. A multipart holds three things: a collection of RWMimeHeader objects, a collection of RWMimePart objects, and an RWCString preamble. The part body collection and the header collection may be empty. The preamble is always present, but may be an empty string.

Each RWMimePart itself contains a collection of headers and a part body. For a simple MIME part, the part body is an RWCString.

The MIME message in Example 27 contains two MIME parts. The first part is text intended for display in an email reader. The second is an attached text file.

Example 27: MIME multipart message

As shown in Figure 15, the MIME package represents this message as an instance of RWMimeMultipart. The instance holds an RWMimeHeader object for each header in the message – in this case, 6 objects. The preamble of the multipart, an RWCString, contains this text:

The message holds two RWMimePart objects. The first part contains a single header and the RWCString part body

The other part contains 3 headers and the RWCString part body

Notice that every simple MIME part within the message is represented using RWMimePart. The MIME package itself does not distinguish between the content of the message and the attached file.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.