GetT IMAP Mail Messages - mail processing order

Hi,

I have one “problem” with loading emails through GET IMAP MAIL MESSAGES activity. What happens to us is that the robot does not process emails from first delivered to the last one. What usually happens is that the robot starts correctly with the email received first, but then takes (2nd on oder) the e-mail received a month ago.

So I would like to ask if anybody has already experienced that? Or how to set the robot to process emails from first delivered to last? We are also using IBM Notes to process emails, but from my knowledge it should not be issue when using IMAP protocol for the connection.

Thank you for all replies,
Marek

Once you get the mail message list, sort the emails. Try the following query -

mailList = mailList.OrderBy(Function(x) x.Headers("date")).ToList

Hi Kathik,

thank you for your reply, but I am not sure how to use your query. What Funtion(x) means?
Syntax should be used in For each Activity? I dont now how to integrate your advice into my sequence.

Standartly I am starting my sequence with GET Imap Mail Messages and my output is mailList.

Thank you for your interest!
Marek

You have to assign activity and assign the mailList to the expression I gave.

The expression I gave is LINQ query. Function(x) is anonymous method which invokes on each mail object. Here is ‘x’ is a mail object passing as an input.