Extract attachments from Emails To extract attachments from emails getContainer method is used. This method returns the collection of ContainerItem objects.
Email Attachment can contain the following metadata:
Name Description content-type The MIME type of the attachment content These metadata refer to a container element itself, not a document.
Here are the steps to extract an email text from email attachments:
Instantiate Parser object for the initial document; Call getContainer method and obtain collection of ContainerItem objects; Check if collection isn’t null (container extraction is supported for the document); Iterate through the collection and obtain Parser object to extract a text....Annotation Product Solution GroupDocs...ContainerItem item : attachments ) { // Print the file path System . out ...