I have a scenario where I have to process a set of unread emails.
Say i fetch only unread emails from top 100 mails.
My requirement says that, while processing those mails [Oldest First - this is achieved by list.Reverse], if a business condition is satisfied, then i should stop processing further mails. And when the bot starts running again from the next time it should take again the remaining mails that were unprocessed.
But here since the mails were already marked as read in the first execution those will get missed from processing.
Is there any way where I can just get a list of mails and then mark every mail as read one at a time?