How To Read Emails In FIFO Order

How to read emails in FIFO order, where it should be possible to fetch all the emails from bottom to top order only i.e older emails first (FIFO logic)?

Resolution: The activity Get Exchange Mail Messages reads the latest emails first (LIFO logic). By default emails are read in the LIFO (Last In First Out) order, to reverse the order below approaches could be used:

  • For illustration, one could use the 'Get Outlook Mail message' activity and read n number of emails.

Approach #1:

  • Make use of Invoke Method activity and use of the " Reverse" method on List of Mail Messages

Approach 2:

  • Use Assign activity with the below logic to convert the list in FIFO order .

mm.OrderBy(Function(x) x.Headers(“date”)).ToList


Read more on