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: yes to treat content as a MIME entity. addBodyPart will strip out the header fields from the top of content and add them to mimeData as part headers. The remaining data will be treated as the payload. Note: addBodyPart assumes that all data up to the first blank line represents the entity's header fields. no to treat content as an ordinary payload. | |
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: 7bit to specify that content is 7-bit, line-oriented text that needs no encoding. This is the default. 8bit to specify that content is 8-bit, line-oriented text that needs no encoding. 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. binary to specify that content contains binary information that needs no encoding. 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. quoted-printable to specify that content contains 7 or 8-bit, line-oriented text that you want to encode using the quoted-printable encoding scheme. base64 to specify that content contains an arbitrary sequence of octets that you want to encode using the base64 encoding scheme. uuencode to specify that content contains an arbitrary sequence of octets that you want to encode using the uuencode encoding scheme. | |
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: yes to append a new body part to mimeData. This is the default. no to replace the existing payload with the new body part. (Depending on the value of replace, this setting may cause addBodyPart to throw an exception.) | |
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: yes to replace the existing payload with the new body part. This is the default. no to throw an exception. |
mimeData | Document MIME object to which the body part was added. |