Content |
public static JoinedMimeMessage JoinMimePartialMessages( List<Stream> allPartialMessagePartStreams )
MIME partial-messages occur if a message and its attachments are too large for a mail client to handle (upper limit on message size) - in this case, a MIME message is broken into smaller email message parts that are sent and need to be merged back together as the original message by the receiving mail client.
Each open stream in argument 'allPartialMessageParts' must correspond to an email document that was previously identified as MimeEmailPartial.
When a partial message is content extracted via the IDocumentContentExtractor interface returned by GetContentExtractor(Stream, IdResult, String, ContentExtractionSettings) it is not fully processed and has a returned Result of RequeueAsSeparateTask. The reason for this is all parts of the MIME partial message need to be identified first so they can be joined by this method into a complete MIME message and then reprocessed.
Properties MimePartialMessageId and MimePartialMessagePartNumber will be set for each MIME partial message that is content extracted. Property MimePartialMessageTotalParts may or may not be set on each MIME part. Often just the first or last MIME partial message part has this property set. These properties can be used to find all partial messages by their unique id (MimePartialMessageId and to make sure all parts have been obtained (MimePartialMessageTotalParts).