Integration Server 10.3 | Built-In Services Reference Guide | MIME Folder | Summary of Elements in this Folder | pub.mime:addMimeHeader
 
pub.mime:addMimeHeader
WmPublic. Adds one or more header fields to a specified MIME object.
Input Parameters
mimeData
Document MIME object to which you want the header fields added. (This IData object is produced by pub.mime:createMimeData.)
mimeHeader
Document Header fields that you want to add to the MIME object. Key names represent the names of the header fields. The values of the keys represent the values of the header fields. For example, to add the following header fields:
X-Doctype: RFQ
X-Severity: 10
You would set mimeHeader as follows:
Key
Description
X-Doctype
RFQ
X-Severity
10
Be aware that the following MIME headers are automatically inserted by pub.mime:getEnvelopeStream when it generates the MIME message:
Message-ID
MIME-Version
If you set these values in mimeHeader, pub.mime:getEnvelopeStream will overwrite them at run time.
Output Parameters
mimeData
Document MIME object to which the header fields were added.
Usage Notes
This service operates on the MIME object (mimeData) produced by pub.mime:createMimeData.
If you add MIME headers before you add multiple body parts, the header fields will be added to each of the body parts. If you do not want this behavior, either drop mimeHeader from the pipeline immediately after you execute addMimeHeader, or invoke addMimeHeader after you've added all body parts to the MIME object.
Be aware that the contenttype and encoding parameters used by the pub.mime:addBodyPart service will override any Content-Type or Content-Transfer-Encoding settings in mimeData. Moreover, in certain cases, the pub.mime:getEnvelopeStream will override these settings when it generates a multipart message. For information about how the Content-Type or Content-Transfer-Encoding headers are derived at run time, see the Usage Notes under pub.mime:addBodyPart.
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:getMimeHeader
pub.mime:addBodyPart