Copying message[s] between folders using IMAP
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Asim_Parekh
Posted On:   Friday, June 1, 2001 05:22 PM

Hello ALL, What I am trying to do is to get all the messages from a folder, say folder 'A' (by doing folder.getMessages()), change the subject of each message, then copy the message to a different folder, say folder 'B'. The messages I get by doing folder.getMessages() are immutable messages (i.e. I can't change them), the only way I can think of is to make create a new message, copy the content of the old message into the new message and then copy the new message to folder 'B'. How can I do that, as the messages may have different types of files attahced to them?? I have tried creating a new Mime Message by doing this new MimeMessage(session, oldMessage.getInputStream());    More>>

Hello ALL,
What I am trying to do is to get all the messages from
a folder, say folder 'A' (by doing folder.getMessages()), change
the subject of each message, then copy the message to a different
folder, say folder 'B'. The messages I get by doing folder.getMessages()
are immutable messages (i.e. I can't change them), the only way I can
think of is to make create a new message, copy the content of the
old message into the new message and then copy the new message
to folder 'B'. How can I do that, as the messages may have
different types of files attahced to them?? I have tried creating
a new Mime Message by doing this
new MimeMessage(session, oldMessage.getInputStream());

It works but only for messages without any attachments. The application
hangs on this particular call, if the message that I am trying to duplicate
contains attachments.

Could somebody please help?? I 'd appreciate it.

Thanks

-Asim

   <<Less

Re: Copying message[s] between folders using IMAP

Posted By:   elango_maragtham  
Posted On:   Thursday, June 7, 2001 07:52 PM

Hi Asim ..
I have once done copying the messages from one foldr to other . It worked correctly. U have to openn then source folder and get the message and open the destination folder in readwrite mode then copy the message to the destination folder. I think u can copy only array of messages u declare a array of message store only ur message in the array ..I think this may help u ..
bye
Elangomca@yahoo.com
About | Sitemap | Contact