0

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?

CID present in attachment chunk

1 Answer 1

0

You can read the CID attribute values of each embedded attachment from the message body where images are used. The attribute can be missed on the attachment.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.