How to mark messages that are received by an java application using javax Mail Api?
Posted
by
telebog
on Stack Overflow
See other posts from Stack Overflow
or by telebog
Published on 2010-07-30T14:48:02Z
Indexed on
2011/01/18
2:53 UTC
Read the original article
Hit count: 275
java
|javax.mail
I want to create an application that gets all e-mails from an e-mail account using imap. When I first run the application I get all mails, than if I run it again I want to mark the messages that was read before so I can receive only new messages.
I found that Message Object contains Flags(System Flags and User defined flags), but I can't manage to set one user defined flag.
It is possible to mark the messages received by my application on the e-mail account, or I have to retain all message ids and every time when I get messages from imap I have to compare their id with retained ids and get only the messages that has different ids?
© Stack Overflow or respective owner