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!

setting type of imap folder during its creation

843830Jun 28 2005 — edited Jun 28 2005
hi @ all,

i've been playing around with javaMail api on my imap server for the last two days. Now i want to create a new folder by using the api. i figured out, that this can be done using the following code:
Store store=folder.getStore();
store.connect();
Folder folder= store.getDefaultFolder();
store.close();
Folder newfold=folder.getFolder(Sent-mail);
if(!newfold.exists())
newfold.create(Folder.HOLDS_MESSAGES);
folder=newfold;
folder.setSubscribed(true);
folder.open(Folder.READ_WRITE);
want i do not think that it is solfed realy well is that i only can set the type of the new folder either to keep messages or other subFolders.

how can i set the type of a folder for holding both, messages and subFolder?

thx in advance

dialsc
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 26 2005
Added on Jun 28 2005
1 comment
167 views