Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get "real" message source?

843830Sep 20 2006 — edited Oct 10 2006
Hello all!

Is it possible to get the "real" message source from a message (as javamail read it from the server)?

I know about this:

ByteArrayOutputStream baos = new ByteArrayOutputStream();
message.writeTo(baos);
return(baos.toString());

but according to the javadoc, MimeMessage will "Output the message as an RFC 822 format stream".
Doesn't this mean that maybe the result is not the same as the Message on the server? Not good if there's an error in the message source and the MimeMessage "formats" it away!??

Thanks a lot in advance for any hint!

Grets
lotk
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 7 2006
Added on Sep 20 2006
4 comments
131 views