If you dont need background information, just go straight to the question at the bottom.
I am working on a project. The project includes email reading process on hourly basis.
Currently, I simply read all emails and mark them as read. But when my robot throw exception and crashes, it can not re-process those emails I read since it is marked as read. I have to manually select and mark those emails as unread again in order to re-process them.
After that I decide to not mark emails as read at beginning of my process. I simply read emails at beginning and at the end of my process I read emails again to mark as read. But this cause another interesting problem: If I receive emails after robot starts & before robot ends, I will falsely mark the unprocessed email data as read as well.
[QUESTION:]
I want to find an approach to read emails sent within a certain time interval (09:30-10:30, etc).
Or read emails after a certain datetime(after 09:30, etc).
Or simply find a way to mark emails as read emails, not in âGet Outlook Mail Messagesâ activity, but within the for each loop of email list I got from âGet Outlook Mail Messagesâ activity.
There must be a way to achieve my goal⌠If my demand confuse you, please go through background info.
Hey⌠thanks for the answer⌠any clue why it wouldnât work without addDays(0) as logically we are not adding any days so this part is redundantâŚ
Also we were using the format today.tostring(âMM/dd/yyyy hh.mm yyâ) which was working since last 3 months in âGet Outlook Mail Messagesâ filter but suddenly it stopped working⌠anyone else has experienced this?
I have used same expression, but it does not seem to be working. Any alternatives?
Used Filter : Both are not working (Last 5 Hours)
â[Received]>'â+DateTime.Now.AddHours(-5).ToString+â'â
â[ReceivedTime]>'â+DateTime.Now.AddHours(-5).ToString+â'â
You can use :
â@SQL=urn:schemas:httpmail:datereceived>='â+DateTime.Now.ToUniversalTime.AddMinutes(Your GIVEN DURATION AS STRING ).ToString(âMM/dd/yyyy HH:mm ttâ)+â'â