Business Processes and Rules: Siebel Enterprise Application Integration > Data Mapping Using Scripts >
Attachments and Content Identifiers in MIME Messages
A MIME message contains one or more parts, each representing a separate piece of the message. One common use of multipart MIME messages is to include attachments with a message. NOTE: All the examples have to be typed single-spaced and without word wrap.
Each MIME body part has an optional Content Identifier (CID) used to identify it. The Content Id is part of the MIME part header, for example: --unique_boundary_123
Content-Type : image/jpeg
Content-ID : <001110.102215@abc.com>
Then the CID is 001110.102215@abc.com. The CID is usually referenced from another part of the MIME message. A common scheme is to use an XML document as the main part of the MIME message, and use Content Ids to reference the other attachments in the message. The following is an example of a MIME message with attachment. MIME-Version: 1.0
Content-Type: multipart/related;
boundary="unique_boundary_123";
type="application/xml"
Content-Transfer-Encoding: binary
--unique_boundary_123
Content-Type: application/xml; charset="UTF-8"
Content-Transfer-Encoding: binary
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Memo SYSTEM "Memo.dtd">
<Memo>
<To>All Employees</To>
<Subject>Map and Directions</Subject>
<Body>Maps to company headquarters are attached.</Body>
<ListOfAttachments>
<Attachment>
<URI>cid:001110.102203@siebel.com</URI>
<Filename>largemap.jpg</Name>
</Attachment>
<Attachment>
<URI>cid:001110.102211@siebel.com</URI>
<Filename>detailmap.jpeg</Filename>
</Attachment>
</ListOfAttachment>
</Memo>
--unique_boundary_123
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
Content-ID: <001110.102203@siebel.com>
[... Raw JPEG Image ...]
--unique_boundary_123
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
Content-ID: <001110.102211@siebel.com>
[... Raw JPEG Image ...]
--unique_boundary_123-
|