How to write a query for the Filter property of Get Outlook Mail Message?

Hi All

I want to check if a mail is from a specific domain (like @xyz.com). Then how can i make a filter query for the Get Outlook Mail Message activity ?

@SQL=" & Chr(34) & “urn:schemas:httpmail:sender” & _
Chr(34) & " LIKE ‘%“@xyz.com”%’"

is it right ?

you can simply use the EndWith function

Read Mail messaged
Loop them using For each
In the Loop
Just check, row.Address.toString.EndsWith(“YOU DESIRED DOMAIN”)

This will return true if that mail has domain as per you want

1 Like

Yes that i am anyway doing. I was expecting in the query.

you need a script instead of the for loop?

To filter the email list for your condition?