How to add two condtions to mail Get mail Activity

Hi Team,

i been using this code to get the mails equal to this subject and today mails

“[subject]=‘My Subject’ And [ReceivedTime] > ‘08/11/2021’”

but this code also give me last day mail also can someone help me in this

Thank you

You need only the e-mails for today so you can use the ReceivedEmailDate = Now.Date.ToShortdate

The received email date must be converted into date time variable to perform this comparison

below can be used to convert string date to date of datetime data type
Datetime.ParseExact(strRecievedEmail,“dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture)

1 Like

Hi,

There is a sample query for “All mail messages received today” in the following document. Can you check this?

Regards,

1 Like

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