How can I read 10 latest emails
843834Jun 9 2010 — edited Jun 10 2010Hi,
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?