Discussion:
What is the order of retrieval for folder.getMessage(1)
KevinHB
2009-03-13 21:52:14 UTC
Permalink
If I have a bunch of messages in a folder (say folder.getMessageCount() == 5)
and I call folder.getMessage(1) is there any way to tell which message I'm
going
to get? Maybe based on received date? Maybe it depends on the provider?
In my testing it appears that there isn't an ordering but I wanted to ask.

Thanks,
Kevin.
--
View this message in context: http://www.nabble.com/What-is-the-order-of-retrieval-for-folder.getMessage%281%29-tp22504487p22504487.html
Sent from the Javamail mailing list archive at Nabble.com.

===========================================================================
To unsubscribe, send email to ***@java.sun.com and include in the body
of the message "signoff JAVAMAIL-INTEREST". For general help, send email to
***@java.sun.com and include in the body of the message "help".
Bill Shannon
2009-03-13 23:08:40 UTC
Permalink
Post by KevinHB
If I have a bunch of messages in a folder (say folder.getMessageCount() == 5)
and I call folder.getMessage(1) is there any way to tell which message I'm
going
to get? Maybe based on received date? Maybe it depends on the provider?
In my testing it appears that there isn't an ordering but I wanted to ask.
Most servers will insert messages into the mailbox in the order they
arrive, and that's the order you'll see. Of course, it's possible for
the server to do otherwise, as long as it meets the requirements of the
protocol being used to access the mailbox. For example, IMAP won't
allow you to insert a new message between two existing messages, and
there are requirements about the stability of UIDs over time.

===========================================================================
To unsubscribe, send email to ***@java.sun.com and include in the body
of the message "signoff JAVAMAIL-INTEREST". For general help, send email to
***@java.sun.com and include in the body of the message "help".
Loading...