Current Position:Home > How can i move a mail message from INBOX to other Folder

How can i move a mail message from INBOX to other Folder

Update:10-11Source: network consolidation
Advertisement
I want to store all the mail messages to some specific folder after read it. i tried it with setFlags but it's not working
Plz suggest any of the option
Thanks in advance ..

The Best Answer

Advertisement
i created a folder name as "ShiftedMails" and try the following code:
objFolder.copyMessages (msgs, objFolder.getFolder("ShiftedMails"));
but got the error:
{color:#ff0000}javax.mail.MessagingException: not a directory
at com.sun.mail.pop3.POP3Folder.getFolder(POP3Folder.java:127){color}