Enrico Donelli
unread,Oct 25, 2012, 5:06:44 AM10/25/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to java-libp...@googlegroups.com
Hi all, I need to extract the messages from a PST (I think it's outllok 2003 format), but I have a problem with attachments: it seems that in case the attachment is a msg, only few bytes are extracted, nothing usable. No problem if the attachment is a .doc or an .xls file.
I'm doing something like:
int numberOfAttachments = email.getNumberOfAttachments();
for (int x = 0; x < numberOfAttachments; x++) {
PSTAttachment attach = email.getAttachment(x);
InputStream attachmentStream = attach.getFileInputStream();
// save the stream in a file
}
Am I doing anything wrong?
Thanks in advance!
Enrico