I am working on showing previews of MSG files. For this, I am parsing the email content in Java. To read the MSG file, I am using Apache POI (and want to limit my need to add additional dependency). Now, I want to extract the CID of inline embedded attachments. For this I am getting all the attachments from the MAPIMessage object but the CID is not present in the AttachmentChunks as an attribute.
MAPIMessage message = new MAPIMessage(fileInputStream);
AttachmentChunks[] attachments = message.getAttachmentFiles();
However, I can see the CID is present inside AttachmentChunks::getChunks (refer image) array but in no particular order. How can I get the images CID?