{
"Parts": [
{
"Headers": {
"Content-Type": "text/plain; charset=utf-8; name=helloworld.txt",
"Content-Transfer-Encoding": "base64",
"Content-Disposition": "attachment; filename=helloworld.txt"
},
"ContentRef": "Attachment1"
}
],
"Attachment1": "SGVsbG8gV29ybGQh"
}In the payload, there is a Parts array. This collection contains every part of the parsed message. This collection relates directly to how an email is represented in Content multipart.
If the parsed message contains attachments, they will be also included in the payload.
To retrieve them, you can either loop on the Parts collection and look for any part where the ContentRef property starts with Attachment or you can look directly for the AttachmentN property (where N is the ID of the attachment in the message, following their order).
The content of the attachments is always encoded in Base64. Content-Transfer-Encoding indicates the original encoding of the attachment.
For instance, in a message containing one attachment of type text/plain containing "Hello World!", we will have this payload.