Hello,
I’m trying to use DASL query to get subject and sent date to verify that the email was sent, i.e. is in the outlook ‘Sent Items’ folder.
I’m using the Get Outlook Mail Message activity, as follows:
My query in the filter is as follows, where I am trying to get an email from
"@SQL=(""http://schemas.microsoft.com/mapi/proptag/0x0037001f"" like '%PLATO FILE MOVE REQUEST%') AND (""http://schemas.microsoft.com/mapi/proptag/0x0E060040""> 'system.DateTime.Now.AddMinutes(-500)')"
system.DateTime.Today
is output as 08/15/2019 07:21:19 so that’s ok, as I want to find emails since this morning, let’s say.
It seems to pick up the correct email sent today, however if I change the minutes to -60 to find within the last hour, when I know there won’t be any emails to pick up, the process returns the same email. I was hoping it wouldn’t return anything and have EmailList blank.
If I hard-code the date where no email was sent as 2019-08-15 15:00:00, it returns a log message ‘No Email Found’ which is what I want.
"@SQL=(""http://schemas.microsoft.com/mapi/proptag/0x0037001f"" like '%PLATO FILE MOVE REQUEST%') AND (""http://schemas.microsoft.com/mapi/proptag/0x0E060040""> '2019-08-15 15:00:00')"
I would be grateful for any suggestions on how to make it work without hardcoding the date.
byuli