Problem 1.
When processing “.emlx” files, some files appear to have multiple copies of attachments. When attachments appear more than once, only the last instances seems to be valid.
If I open the same file in a mail program, it only shows one copy of each attachment.
My questions are
-
Is this a known problem?
-
Is there a recommended work-around?
-
Is skipping all but the last copy of an attachment safe?
I’m attaching a sample program that demonstrates the problem along with sample .emlx files.
Problem 2.
I’m also struggling with .emlx files that come from Apple’s mail program in Lion and Mt Lion. A number of these files have a secondary extension on them. For example,
123456.parital.emlx
These are “.emlx” files and the aspose.email library can open it, but all is not right. Files of this form are accompanied by one or more secondary files with names in the form:
123456.N.emlxpart
Where “N” is an attachment number.
According to my reading of various comments on the web and Apple’s naming of the file in the Finder, the “.emlxpart” files are attachments. I find that the “.partial.emlx” file is missing one attachment for each of the “.emlxpart” files that appear. When I try to open the attachment Attachment.getContentStream(), I get a stream, but no bytes are available.
The same sample program demonstrates the problems with these kinds of files.
Summary of Attachments
-
MailProcessingTest.java (An application that has you choose a mail file to open. Once open, the application prints some header information along with the names of all attachments and the body of the eMail. It ends by saving each attachment to disk in its own file.)
-
Duplicate Attachments Folder (Three .emlx files which have the problem.)
-
Partial EMLX Folder (Three .partial.emlx files with their emlxpart pieces.)