Get list of mails but "Mark as Read" one by one

email
outlook

#1

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?


#2

Unsure reg filter…How about using a counter and fetching 1 email at a time and using filter to get old email?

For filter


#3

good option tough…i can go by this for the timebeing…
the mail account is a user account not a bot specific account.
more over the filter mentioned gives me mails from today and yesterday.(What if i there exist more emails which are unread even before yesterday.) i need this to be dynamic.


#4

Check the MS link in that post and see if it helps.


#5

I am looking for a similar “get the oldest email” solution, but I need it to work for exchange server. anyone tried it?