This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes Sorting messages in a Folder in JavaMail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Sorting messages in a Folder in JavaMail" Watch "Sorting messages in a Folder in JavaMail" New topic
Author

Sorting messages in a Folder in JavaMail

Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244
Dear all,

As the javax.mail.Folder class doesnt have a sort method, the option to sort messages in any folder using Javamail is by using the Comparator.

Is there any other workaround code for achieving the same?

Rgds,

Seetesh
Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244
Any one?

Without using Collection.sort or using Comparator

Rgds,

Seetesh
Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244
I have fetched all messages in an arraylist and then sorted the same using comparator.

Any other way of sorting an Inbox folder directly.

Rgds,

Seetesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sorting messages in a Folder in JavaMail
 
Similar Threads
JavaMail API IMAP Provider copyMessages
javamail api and timestamping
JavaMail API for Unread yahoo messages not working.
reading mail from the server not from inbox
sun.net.smtp....API's ???