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!

How can I read 10 latest emails

843834Jun 9 2010 — edited Jun 10 2010
Hi,
I want to write an application that uses javamail. The application needs to be able to read my gmail inbox and read the last 10 unread messages received. Also the messages have to contain a specific subject matter. I am sure this possible. Its seems that from my search on the net, I cant find anything that resembles this. Can someone point me to an example that is similar to what I want?

When I run the msgshow.java demo program it seems that the data is in chronological order. So I get my earliest message first. This is not what I what. I need to get the messages in the reverse order. Is this is possible?

Also the total number of messages it thinks is in my inbox is 272. There is no way that this is the case, because I have thousands of messages in this inbox. Can someone please explain?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 8 2010
Added on Jun 9 2010
4 comments
4,600 views