Class MailSorter


  • public final class MailSorter
    extends Object
    Utility class for sorting of mail messages
    • Method Detail

      • sortMessages

        public static void sortMessages​(javax.mail.Message[] messages,
                                        com.sun.mail.imap.SortTerm[] sortTerm)
        Sort the messages. This emulates sorting the messages on the server if the server doesn't have the sorting capability. See RFC 5256 Does not support complex sorting like in the RFC (with Base Subject or other similar stuff), just simple comparisons.
        Parameters:
        messages - Messages to sort. Are sorted in place
        sortTerm - Sort term