Creating a Multipart MIME Part
MIME parts often contain more than one document within a single part. Each document contained in a multipart part is a complete MIME part or MIME message. Therefore, the MIME specification refers to messages that contain multiple documents as multipart parts. This section describes the step-by-step process for creating a multipart/mixed
part, a multipart type typically used for email attachments. The process for other multipart content types is similar.
To create a multipart/mixed
message:
1. Create a MIME part for each part of the message containing the data. The steps for creating a simple MIME part are described in Creating a Simple MIME Part.
2. Create headers for a multipart (Create Headers for a Multipart).
3. Create an RWMimeMultipart (Create an RWMimeMultipart).
4. Add each part to the multipart body (Add Each Part).
5. Add the headers to the message (Add Headers to the Part).
6. Create a MIME string (Create a MIME String).
The section Program: Creating a Multipart MIME Message presents a complete example program that creates a multipart MIME message.
In this section: