Mapping the output to an activity

In this task, you map the elements of the parts XML output parameter to variable(s).

The entity/entityBody element of the parts output parameter contains the body and the attachments of the mail message. To access the body and the attachments of the mail message, you must iterate though the instances of the entity element using the For Each or While Loop activities

The order of the attachments and the body in the entity element depend on the email client that sent the message and the type of message (either plain text or HTML). For example, for a plain text email message sent from a Microsoft Outlook client, the parts output parameter consists of the following entity elements:
  • The first entityBody element contains the body of the message.
  • If an attachment was included in the message, the second entityBody element contains the first attachment.
  • If a second attachment was included in the message, the third entityBody element contains the second attachment.
...and so on with the rest of the attachments.

You may need to decode the attachments before parsing the contents of the attachment. For example, an attachment that is encoded with the base64 encoding must be decoded before the contents of the attachment can parsed by the Read Flat File activity. Another attachment might be text and therefore can be parsed without decoding.

Note: The Email and MIME activities can only process 8-bit or binary data using the UTF8 charset. Only MIME 1.0 compliant email messages are supported. The Read MIME activity can only parse email messages that have come from a MIME 1.0 compliant Email Server. If the message you are parsing in the Read MIME activity does not come from the Get Email activity but from another activity such as the HTTP Receive Request activity, you must create a Flat File Schema to parse the MIME header from the payload.



Feedback | Notices


Timestamp icon Last updated: Wednesday, 15 June 2016


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/Map_Activity_Output_Read_MIME.html