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!

HELP. How to read unread message from Gmail?

845850Mar 8 2011 — edited Mar 8 2011
Folder inbox = store.getFolder("INBOX");
inbox.open(Folder.READ_ONLY);
FetchProfile profile = new FetchProfile();
profile.add(FetchProfile.Item.ENVELOPE);
System.out.println(inbox.getUnreadMessageCount());
It print out the number of all messages. I just want to get it number of unread message.

I have bean searching for a long time. Is there any one can help me. I just want to make a Gmail notifier. Ring me when I get unread email.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 5 2011
Added on Mar 8 2011
2 comments
234 views