Link to home
Start Free TrialLog in
Avatar of TLTEO
TLTEO

asked on

JavaMail delete message on server

HI

I am trying to delete a message, first by setting the

messages[i].setFlag(Flags.Flag.DELETED, true);


then use folder.expunge();


But my pop3 server doe snot support this method.


Is there a method to delete a message on a mail server after reading it,  using JavaMail API??
Avatar of ia_ia_ia_1
ia_ia_ia_1

I think u should close the folder using folder.close(true) - the flag indicating u would like to reflect the deletion on the server
ASKER CERTIFIED SOLUTION
Avatar of ia_ia_ia_1
ia_ia_ia_1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TLTEO

ASKER

tks  so simple and so good. apprec it. cheers