When parsing a received email with Mail MIME Service, there is no way
to distinguish the body document from attachment documents.
Which one of PrimaryDocument or Mail_Mime_DOC_2 is the body ?
- Body is in PrimaryDocument
- Body is in Mail_Mime_DOC_2
- Body is actually null, and it turns out PrimaryDocument and
Mail_Mime_DOC_2 are attachments
The problem is the Mail MIME Service assumes that the first document in the MIME message is always the email body. This is wrong.
The RFC 2183 (https://www.ietf.org/rfc/rfc2183.txt) defines how to differentiate the body from attachments, by evaluating the Content-Disposition header.
The Mail MIME Service should evaluate this header as well, and add a new tag in the ProcessData to indicate which returned document is the body (if there is a body in the email).