I am using IMAP protocol to fetch mails from Google server using java mail. Mails I retrieved are listed in descending order. How do I retrieve the most recent mail first based on arrival date?
Messages are stored as they arrive. The highest numbered message should be the most recent. Just access them in reverse order.