When I fetch messages from a UIDFolder via the getMessagesByUID() method, are they returned in any particular order?

John Zukowski

The getMessagesByUID(long[] uids) version will return the messages in the order of the UIDs in the array. If one particular UID is invalid, null will be in the returned array. For the getMessagesByUID(long start, long end) version, there is no predefined order for the resulting array. It happens to be in whatever order the server decides to return things.