• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JavaMailApi - problem with deleting messages

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:

 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Today's lesson is that you can't wear a jetpack AND a cape. I should have read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic