Outlook mail message

Hi I want to process out look mails one by one and repeat the process till all unread mails are processed. I don’t want to get unread mails as list of messages, rather want to get a message.
I wan to do this as the process is long and i don’t want to put whole process in for each loop.
Any suggestions?

Hello Sanjeev,

I have a process like this currently in production. One of the gotcha things that we found out is that you absolutely need to grab more than just one email at a time because the request to grab only unread messages is checked only after it has grabbed emails. What I mean by that is that, if you ask for the top 20 emails and 19 of them are read, you will only get 1 email back, even if there are more unread messages after those ones.

Your statement regarding a for each loop is worrying, you really should be using the ReFramework as that will perform the necessary iterative steps to perform each transaction, in your case the steps to process each individual email.

Thanks, I am not sure how to work with RE framework, so was trying to to without that.

@sanjeevSB

fetch only one mail at a time by setting property top =1 and after processing this mail get another mail.

add a condition after getting mail to check the output mail list is empty or not.

If it is empty then end the process if not then proceed with processing the fetched mail.

thanks.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.