How to sort the messages in JavaMail?
Location: http://www.jguru.com/faq/view.jsp?EID=266225 Created: Nov 30, 2000 Modified: 2000-11-30 09:31:57.594 Author: John Zukowski (http://www.jguru.com/guru/viewbio.jsp?EID=7) Question originally posed by guan ho (http://www.jguru.com/guru/viewbio.jsp?EID=126860 Within the JavaMail classes there is no support for this. However, once you get the array of messages back from a folder, you can call the Arrays.sort() method in the collections framework to sort the messges. Since MimeMessage doesn’t implement Comparable, you’ll need to provide your own Comparator specifying how you want the messages to be sorted.