please,how can I use javamail to implementing draft box on webmail

please,how can I use javamail to implementing draft box on webmail
[81 byte] By [fly6677] at [2007-9-26 1:15:38]
# 1
I already can send and receive EMail create subfolder with javamail in imap server.but I don't know how implement draft mailbox with webmail .please expert help me . thanks
fly6677 at 2007-6-29 0:42:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
hi,Can you please send me the code Thanks
manishmunot at 2007-6-29 0:42:20 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
How can I save a message as draft using javamail? If any one has the code to do that, can you please post it or send it to me at t_linda@hotmai.com. Thanks!
t_linda at 2007-6-29 0:42:20 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
How can I save a message as draft using javamail? If any one has the code to do that, can you please post it or send it to me at t_linda@hotmail.com. Thanks!
t_linda at 2007-6-29 0:42:20 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5

> I already can send and receive EMail create

> subfolder with javamail in imap server.but I don't

> know how implement draft mailbox with webmail .

> please expert help me . thanks

you can only create subfolders in a imap mail server ,and you can use folder class included in javamail api to access,create,modify and delete subfolders.You also can create subfolders under a subfolder as you want.

the simple example is:

//first create mail session

mailSession=...

// second create mail store

mailStore=...

//third get root folder

IMAPFolder rootFolder = (IMAPFolder)mailStore.getFolder("INBOX");

if ((rootFolder==null)||(!rootFolder.exists())) return false;

//finally create a subfolder "outbox" under root folder "inbox"

IMAPFolder tmpOutFolder = (IMAPFolder)rootFolder.getFolder("OUTBOX");

if (tmpOutFolder==null) return false;

//if the target folder not exist just create it

//note:when you create a subfolder you can assign its attribute.Details,please read the javamail document.

if(!tmpOutFolder.exists()) tmpOutFolder.create(Folder.HOLDS_MESSAGES);

zhaojb_sun at 2007-6-29 0:42:20 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...