This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Deleting Messages with JavaMail

 
Tripp Bishop
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy all,

I've got a question about deleting messages. I'm marking a message to be deleted like so:

message.setFlag(Flag.Flags.DELETE, true);

Then, when I'm done I close the folder like so:

folder.close(true);

From everything that I've read this should be enough to delete the message from the POP3 server. I don't get any exceptions thrown but the message is still on the server.

Any ideas why this wouldn't be working?

Cheers,

Tripp
 
Tripp Bishop
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind. I was yet again the victim of "Cut and Paste". Turns out that I had opened the folder in READ_ONLY mode. Strangely, the folder doesn't throw an exception in this case.

-- T
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!