Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problems with flag SEEN and Lotus Domino rel. 6.5.5

843830Jun 6 2006 — edited Aug 29 2006
Hi all,
we have an application checking the INBOX (using imap protocol) for new e-mails every day, by applying the following filter:
Message[] messages = folder.search(new AndTerm(new FromTerm(new InternetAddress(myAddres)),
                new FlagTerm(new Flags(Flags.Flag.SEEN), false)));
in order to get only the new e-mails coming from the specified address.
After getting the messages, the application does some logic and then sets the flag SEEN to every single message:
message.setFlag(SEEN, true);
The application had been working properly till a few days ago when the mail server was updated (from 5.0.12 to release 6.5.5). The server is Lotus Domino.
From then on the application is getting all the messages from the specified address, the SEEN ones too.
I've done some testing and it seems that the AndTerm is not working properly. I've tried to get all new messages
Message[] messages = folder.search(new FlagTerm(new Flags(Flags.Flag.SEEN), false));
and it works.
If I change the order of the search terms, it works properly, but I can't understand why:
Message[] messages = folder.search(new AndTerm(new FlagTerm(new Flags(Flags.Flag.SEEN), false), 
	            new FromTerm(new InternetAddress(myAddress))));
Can anyone help me to understand this behaviour?

Thanks,
mavenez
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 26 2006
Added on Jun 6 2006
2 comments
221 views