• Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaMailApi - problem with deleting messages  RSS feed

 
Matthias Mosimann
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to everyone
(Hope your're able to understand me, with my poor English). Well my problem is: I've written a class that can receive mails from a pop mailserver. But now I want to delete them after I have received them. But how can I handle that? It would be nice if someone could explain me that. (Perhaps a very small problem?!). I looked already the FQA here: http://www.jguru.com/faq/view.jsp?EID=17035. But I have still the same problem. Thank you very much for helping.
regards
matthias
folder.delete(true); <- give me an exeption like this: javax.mail.MethodNotSupportedException: Expunge not supported
message[i].setFlag(Flags.Flag.DELETED, true); <- if I add this line the messages are still on the server. (If I fetch the mails with mozilla - mail ... the mails are completly removed.) Here is my code:

 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, from the error message, it sounds like the JavaMail driver you're using doesn't support the delete operation. That seems funny to me; perhaps somebody else has a better idea. I'm going to move this to the "Other Java APIs" forum, where questions about JavaMail are on-topic. Followups there, please.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!