Integration Cloud 6.6.0 | Built-In Services | Built-In Services | getBodyPartContent
 
getBodyPartContent
Retrieves the content (payload) from the specified MIME object.
You use this service for both single-part and multi-part messages.
To retrieve content from a multi-part message, you set the index (to select the part by index number) or contentID (to select the part by contentID value) parameter to specify the body part whose content you want to retrieve. To get the content from a single-part message, you omit the index and contentID parameters or set index to 0.
Input Parameters
mimeData
Document MIME object whose content you want to retrieve. (This IData object is produced by createMimeData.)
index
String Optional. Index number of the body part whose content you want to retrieve (if you want to retrieve the content from a specific body part). The first body part is index number zero.
Note:
If contentID is specified, index is ignored.
contentID
String Optional. Value of the Content-ID header field of the body part whose content you want to retrieve (if you want to retrieve the payload from a specific body part).
Output Parameters
content
IData The payload of the specified body part.
encrypted
String Flag whose value indicates whether content is an encrypted MIME message. A value of:
*true indicates that content is an encrypted message.
*false indicates that content is not an encrypted message.
signed
String Flag indicating whether content is a signed MIME message. A value of:
*true indicates that content is a signed MIME message.
*false indicates that content is not a signed MIME message.
certsOnly
String Flag whose value indicates whether content is a certs-only MIME message. A value of:
*true indicates that content is a certs-only message.
*false indicates that content is not a certs-only message.
Usage Notes
This service operates on the MIME object (mimeData) produced by createMimeData.
If you omit index or contentID when retrieving content from a multi-part message, getBodyPartContent returns the payload from the first body part. If you use index or contentID to select a body part that does not exist in mimeData, content will be null.