Reading a email file placed in a directory into Java Message
843834Jan 7 2010 — edited Jan 7 2010Hi,
I have one email file, say test.msg, in my working directory. I need to read it into a Java MimeMessage object, so that I can further parse it.
I tried to read it as a normal file and read the bytes into a byte array and then created a Message object using this bytearray.
But I loose all the formatting and it comes up in a weird format and i cannot parse it further.
Does anybody have an idea of how to do that?
Thanks.
Edited by: Rahul_01 on Jan 6, 2010 9:25 PM