Integration Server 10.15 | Built-In Services Reference Guide | MIME Folder | Summary of Elements in this Folder | pub.mime:getEnvelopeStream
 
pub.mime:getEnvelopeStream
WmPublic. Generates an InputStream or a MimeMessage representation of a MIME message from a specified MIME object.
Input Parameters
mimeData
Document MIME object from which you want to generate the MIME message. (This IData object is produced by pub.mime:createMimeData.)
index
String. Optional. Index number of the body part for which you want to generate the MIME message (if you want to generate the message from a specific body part). The first body part is index number zero.
contentID
String. Optional. Value of the Content-ID header field of the body part from which you want to generate the MIME message (if you want to generate the message from a specific body part).
Note:
If index is specified, contentID is ignored.
suppressHeaders
String List. Optional. Names of header fields that are to be omitted from message. You can use this option to exclude header fields that getEnvelopeStream generates by default, such as Content-Type and content-encoding.
createMultipart
String. Optional. Specifies whether a multipart message is to be created, even if mimeData contains only one body part. Set to:
*yes to create a multipart message (Content-Type message header is set to "multipart/mixed").
*no to create a message based on the number of body parts in mimeData. This is the default.
*If the message contains only one body part, Content-Type is set according to the contenttype setting specified when that body part was added to mimeData.
*If the message contains multiple body parts, Content-Type is automatically set to "multipart/mixed."
returnMimeMessage
String Optional. Specifies whether the MIME message is returned as a javax.mail.internet.MimeMessage object when any of the body parts in the message exceed the large data threshold set by the watt.server.mime.largeDataThreshold. Set to:
*yes to return the MIME message in the mimeMessage output parameter as a MimeMessage when the watt.server.mime.largeDataThreshold is exceeded. This is the default.
*no to return the MIME message as an InputStream in the envStream output parameter when the watt.server.mime.largeDataThreshold is exceeded.
Note:
The returnMimeMessage input parameter is available after applying a fix that includes PIE-84972 (IS_10.15_Core_Fix8 and higher),
Output Parameters
envStream
java.io.InputStream. Conditional. The MIME message as an InputStream.
mimeMessage
javax.mail.internet.MimeMessage. Conditional. This service returns a mimeMessage instead of an envStream if any of the body parts have data greater than the threshold specified by the watt.server.mime.largeDataThreshold parameter (default 25MB) and returnMimeMessage is set to yes.
Usage Notes
This service operates on the MIME object (mimeData) produced by pub.mime:createMimeData.
If you omit index or contentID, getEnvelopeStream generates the MIME message from the entire contents of the mimeData. If you use index or contentID to select a body part that does not exist in mimeData, content will be null.
getEnvelopeStream automatically inserts the MIME-Version and Message-ID message headers into the MIME message it puts into envStream.
For general information about MIME messages and using the MIME services, see the MIME-S/MIME Developer’s Guide.
See Also
pub.mime:createMimeData
pub.mime:addBodyPart
pub.mime:addMimeHeader