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. The section
Program: Creating a Multipart MIME Message presents a complete example program that creates a multipart MIME message.