MIME parser and domain
Use the MIME domain if your messages use the MIME standard for multipart messages.
The MIME (Multipurpose Internet Mail Extension) parser does not support the full MIME standard, but does support common uses of MIME. You can send the messages to the integration node over HTTP or over other transport types, such as IBM® MQ. Use the MIME domain if your messages use the MIME standard for multipart messages.
The MIME domain does not support Content-Type values with a media type of message.
To specify that a message uses the MIME domain, select MIME as the Message Domain on the relevant message flow node.
Use the MIME domain and parser to parse and write MIME messages. The MIME parser creates a logical tree, and sets up the integration node ContentType property. You can use Compute nodes and JavaCompute nodes to manipulate the logical tree. Set the Content-Type value using the ContentType property in the MIME domain.
Example MIME message
The following example shows a simple multipart MIME message. The message shown is a SOAP with Attachments message with two parts: the root part and one attachment part. The boundary string MIME_boundary delimits the parts.
MIME-Version: 1.0
Content-Type: Multipart/Related; boundary=MIME_boundary; type=text/xml
Content-Description: Optional description of message.
Optional preamble text
--MIME_boundary
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID: <rootpart@example.com>
<?xml version='1.0' ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header xmlns:ins="http://myInsurers.com">
<ins:ClaimReference>abc-123</ins:ClaimReference>
</SOAP-ENV:Header>
<SOAP-ENV:Body xmlns:ins="http://myInsurers.com">
<ins:SendClaim>
<ins:ClaimDetail>myClaimDetails</ins:ClaimDetail>
<ins:ClaimPhoto>
<href>cid:claimphoto@example.com</href>
</ins:ClaimPhoto>
</ins:SendClaim>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
--MIME_boundary
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <claimphoto@example.com>
myBinaryData
--MIME_boundary--
Optional epilogue text
Example MIME logical tree
The following diagram shows a MIME logical tree, which is described in MIME tree details. A MIME logical tree does not need to contain all of the children that are shown in the diagram. The value of the Content-Type header of a MIME message is the same as the ContentType field in the Properties subtree. The Transport-headers are headers from the transport that is used, such as an MQMD or HTTP.
You can further parse the BLOB data in the tree (for example, by using an ESQL CREATE statement) if you know about the format of that MIME part. You might be able to find information about the format from its Content-Type field in the logical tree. Alternatively, you might know the format that your MIME messages take, and be able to parse them appropriately. For example, you might know that the first MIME Part is always an XML message, and that the second MIME Part is a binary security signature.
When the EmailInput node receives an email from an email server that supports Post Office Protocol 3 (POP3) or Internet Message Access Protocol (IMAP), the body of the email message, and any attachments, are propagated in the MIME domain. All other information relating to the email is stored in the Root.Transport headers MIME logical tree; for example, Root.EmailInputHeader.To. Where To is the storage location of one of the email elements. For a complete list of the email elements that are propagated in the MIME logical tree when you use an EmailInput node, see EmailInput node.
You must specify how to parse other message formats, such as tagged delimited or binary data, within your message flow, because the MIME parser does not do this. You must also specify how to handle encoded and signed message parts, because the MIME parser does not process these.
Some pre-defined MIME message models are supplied with the IBM App Connect Enterprise Toolkit and can be imported using the New Message Definition From IBM Supplied Message wizard.