I am evaluating Aspose.Email on
the Java platform, in order to decide if we should use Aspose for our e-mail
archiving solution.
If someone could please address the
following queries, it would help me complete the evaluation.
Here’s our code snippet for how we are using Aspose’ library to parse emails using
Aspose’ library.
To be clear, AsposeMailWrapper
is our custom wrapper class over MapiMessage
PersonalStorage pst = PersonalStorage.fromStream(inputStream,false);
FolderInfoCollection folderInfoCollection = pst.getRootFolder().getSubFolders();
for(FolderInfo folderInfo:MiscUtil.emptyIfNull(folderInfoCollection)){
MessageInfoCollection
msgInfoCollection = folderInfo.getContents();
for(MessageInfo msgInfo: MiscUtil.emptyIfNull(msgInfoCollection)){
if(msgInfo==null) {
continue;
}
AsposeMailWrapper msg = new AsposeMailWrapper(pst.extractMessage(msgInfo));
mailList.add(Mail.builder().mail(msg).build());
}
}
1. Attachments:
a. Binary Data:
We would like a handle to the byte[] or a stream for the byte[] because
we are manipulating the attachment in memory.
MapiAttachment.getBinaryData() returns the content for some
attachments, but for others (particularly,attachments in the .eml format) it returns null and .getObject().getData() is not the correct byte[] either. I have attached an example, with the .eml file extension changed to .doc.
b. File and
Extension Names:
We would like some clarity on the difference between the following
interfaces to get the attachment’s name: getLongFileName(), getDisplayName(),
get FileName()
The results from these methods are inconsistent with how my Outlook
(version 15.32 for Mac) handles the attachments.
Similarly, it would help if the getExtension() method worked – it’s
results are also inconsistent and differ from the actual file names.
c. Spurious/Non-Existent
Data:
MapiMessage.getAttachments() is returning an attachment collection that has an attachment populated with “null” values, and an attachment called Attach.txt that doesn’t exist in the actual e-mail. While we can work around this, it would be good to hear if there are reasons why we are getting this.
2. TimeZone
How can we get the Time Zone info (offset, zone id, etc.) for the PersonalStorage or the MapiMessage
3. Encoding
How can we find
whether a MapiMessage has encoding and how it is encoded?
4. E-mail Size:
How can we find the
size of a MapiMessage?
5. Message identifiers:
We would have liked to
get identifiers for the emails such as journal message id, message id, descriptor
node id, conversation/thread id etc.
The only interface we
can see is the MapiMessage.getInternetMessageId(), which is returning an empty
string ? How can we get this addressed
6. Body Type
We are able to figure
if the body type is HTML, RTF or plain text based on int MapiMessage.getBodyType() –
Is there an Aspose enum (similar to MapiRecipientType) that we could use in order to future proof our code, should the int mapping change?
7. Subject Vs Normalized subject
Could you please
clarify the difference between MapiMessage.getSubject() and
getNormalizedSubject()?
8. Reading .eml and EML<-> MapiMessage conversions
The GitHub project doesn't seem to have an example for reading eml files and for converting MapiMessage to .eml format. Any pointers on this would be useful
9. .olm support:
Do you provide any
support for reading .olm mail format, which is the archiving format for outlook
in Mac?
Regards,
Shankar