Grabbing unread emails goes until first read message

I am using the Get Exchange Mail Messages activity from the UiPath.Mail.Activities pack, version 1.4.1. I am grabbing unread emails and I have noticed that it will only go until the first read message.

I believe this is because, when it is collecting a list of messages, it is going until the first read message and returning. This would be the case regardless of how many emails are grabbed.

The only workaround that I can think of would be to grab emails regardless of whether they’re read, iterating over them, and pull out the unread emails by hand into a new collection and using that.

Do you have an outlook opened while the activity runs? Do you use the flag MarkAsRead? As soon as it grabs the message it will get marked, but in my case i think it always grabbed all unreads…

I do not have Outlook open. That should not affect the exchange mail message activity however. Are you thinking of the Outlook mail activity? I also do not have the MarkAsRead setting checked.

i mean if you have it open, maybe without intention you could set a mail as read…

But then only the read message should be affected by that. What I am saying is that ALL unread messages after a read message are being ignored.

Take this example situation where we have an inbox with messages:

Email 1 (unread)
Email 2 (unread)
Email 3 (unread)
Email 4 (read)
Email 5 (unread)
Email 6 (unread)

If I ask for all unread messages, I am getting an array back of [ Email 1, Email 2, Email 3 ]

I would expect to get All of them except Email 4 in the above case.

oh, so when you make the call to get the emails, you have the above scenario and all unread that is after the first read mail will get ignored? if so, then id open a ticket, because would be a bug for sure…
workaround being, calling the get mail inside a delayed loop like 3 times so you dont miss out in too many emails…