S
sefner
Hello all,
I am trying to use the Javamail API to extract messages from an
Exchange server using the IMAP protocol. Everything so far has worked
fine as long as the Multipart messages don't contain a TNEF part. I
have found JTNEF to parse these parts and extract the attachments but
the problem is when using Javamail I don't see the TNEF part:
Message message = folder.getMessage(1);
assertEquals("checking number of parts", 2,
((Multipart)message.getContent()).getCount());
For instance, the above test fails saying it expected 2 parts but found
1. I'm sure I am getting the correct message and that there is a TNEF
part because:
message.writeTo(System.out)
shows it. Printing out the content of the part I can actually get at
prints the body of the email but this is all I can get. Any
suggestions on what I am missing here?
Thanks for your time!
I am trying to use the Javamail API to extract messages from an
Exchange server using the IMAP protocol. Everything so far has worked
fine as long as the Multipart messages don't contain a TNEF part. I
have found JTNEF to parse these parts and extract the attachments but
the problem is when using Javamail I don't see the TNEF part:
Message message = folder.getMessage(1);
assertEquals("checking number of parts", 2,
((Multipart)message.getContent()).getCount());
For instance, the above test fails saying it expected 2 parts but found
1. I'm sure I am getting the correct message and that there is a TNEF
part because:
message.writeTo(System.out)
shows it. Printing out the content of the part I can actually get at
prints the body of the email but this is all I can get. Any
suggestions on what I am missing here?
Thanks for your time!