GetOutlookMailMessages date range

hi all - questions might be able to help me with

i am trying to get all the mails i have from a given date range 1 month so i am using a filter
“[Received time]>= ‘08/01/2022’ and [Received time]<= ‘08/31/2022’”

the problem i have is that i dont know how may mails i should be expecting. so if i put 30 in the “top” field i may not get enough but also if i out 60 in the “top” field i get mails from July as well



Hi @adrian_sullivan ,
If you give the filter correctly you will get only the mails in that received timeline you specified no matter how much you give the top value.
" [ReceivedTime] >= ‘08/01/2022’ AND [ReceivedTime] <= ‘08/31/2022’ "
put this expression and see and in the log message print the date also along with subject which will give you better idea.
"Subject: "+mailVar.Subject.ToString+"Date: "+mailVar.Headers(“Date”)

Thanks & Regards,
Shubham Dutta

Problem is in date filter, check that

1 Like