mimeData | Document MIME object to which you want to add a body part. (This IData object is produced by
pub.mime:createMimeData.) | |
content | java.io.InputStream or Object Content that you want to add to the MIME object. content can be an InputStream or another MIME object. Use an InputStream to add an ordinary payload. Use a MIME object to add a payload that is itself a MIME message. | |
isEnvStream | String Flag that specifies whether content is to be treated as a MIME entity. Important: This parameter is only used if content is an InputStream. Set this parameter to one of the following values: ![]() Note:addBodyPart assumes that all data up to the first blank line represents the entity's header fields. ![]() | |
mimeHeader | Document Specifies the part headers that you want to add with this body part. Key names represent the names of the header fields. The values of the keys represent the values of the header fields. For example, if you wanted to add the following header fields: X-Doctype: RFQ X-Severity: 10 You would set mimeHeader as follows: | |
Key | Value | |
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 Additionally, you use the content, encoding, and description parameters to set the following fields: Content-Type Content-Transfer-Encoding Content-Description If you set these header fields in mimeHeader and you create a single-part message, the values in contenttype, encoding, and description, if specified, will override those in mimeHeader. See usage notes. | ||
contenttype | String Optional. The value of the Content-Type header for this body part. For single-part messages, this value overrides the Content-Type value in mimeHeader, if one is present. Defaults to text/plain. See usage notes. | |
encoding | String Optional. Specifies how the body part is to be encoded for transport and sets the value of the Content-Transfer-Encoding header. For single-part messages, this value overrides the Content-Transfer-Encoding value in mimeHeader, if one is present. Defaults to 7bit. See usage notes. Note: This parameter determines how the payload is to be encoded for transport. When you add a payload to mimeData, it should be in its original format. The pub.mime:getEnvelopeStream service will perform the encoding (as specified by encoding) when it generates the final MIME message. Set to: ![]() ![]() Note: This encoding value is not recommended for messages that will be transported via SMTP over the Internet, because the data can be altered by intervening mail servers that can't accommodate 8-bit text. To safely transport 8-bit text, use quoted-printable encoding instead. ![]() Note: This encoding value is not recommended for messages that will be transported via SMTP over the Internet, because the data can be altered by intervening mail servers that can't accommodate binary data. To safely transport binary data, use base64 encoding instead. ![]() ![]() ![]() | |
description | String Optional. Specifies the value of the Content-Description header for this body part. | |
multipart | String Optional. Flag that determines how addBodyPart behaves if mimeData already contains one or more body parts. By default, addBodyPart simply appends a new body part to mimeData if it already contains a payload. (This allows you to construct multi-part messages.) However, you can override this behavior if you want to either replace the existing payload with the new body part or throw an exception under these circumstances (see replace parameter, below). Set to: ![]() ![]() | |
replace | String Optional. Flag that specifies whether addBodyPart replaces the existing payload or throws an exception when it receives a mimeData that already contains a payload. This parameter is only used when multipart is set to no. Set to: ![]() ![]() |
mimeData | Document MIME object to which the body part was added. |