Saving Messages...another question
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Gareth_Evans
Posted On:   Wednesday, January 16, 2002 09:02 PM

My problem is this, i'm trying to store MimeMessages in an entity bean, in order to this i have to serialize my Message by using the writeTo() methed... fine When i try toretrive my message i can create a new instance of a MimeMessage by using the MimeMessage( session , inputStream) method. My problem is this.. when i then try to access the message eg. mimemessage.getSubject() i get an exception java.lang.IllegalStateException: Folder is not Open Any ideas? am i missing somthing simple? I'm trying to store a local copy of the message Thanks    More>>

My problem is this, i'm trying to store
MimeMessages in an entity bean, in order to
this i have to serialize my Message by using the
writeTo() methed... fine

When i try toretrive my message i can create
a new instance of a MimeMessage by using the
MimeMessage( session , inputStream) method.

My problem is this.. when i then try to access
the message eg. mimemessage.getSubject() i get an
exception


java.lang.IllegalStateException: Folder is not Open

Any ideas? am i missing somthing simple? I'm trying to
store a local copy of the message

Thanks

   <<Less

Re: Saving Messages...another question

Posted By:   Gianluca_Sartori  
Posted On:   Thursday, January 17, 2002 12:19 AM

I had no problem doing it. Try using this code:




MimeMessage mm = new MimeMessage(Session.getDefaultInstance(System.getProperties()),new FileInputStream(new File("c: empmessage.msg")));
About | Sitemap | Contact