Filter List<MailMessage> using Select

Hi,

I used “Get Outlook Mail Messages” activity to get the list of email , returned as List. I would like to get list of emails from List where the body content contains “rejected” and assign to a variable List type. Here is what i did .
ListOfRejectedEmails = ListOfEmails.Select(“[Body] like ‘%rejected%’”)

But error received ,
Overload resolution failed because no accessible Select can be called with these arguments

Thanks for help

Hi @CheeKeong_Leow,

Why don’t you try this way…
image

Reading the mails and iterate through the list. Then filter and check whether the body contains the string you need…

2 Likes

Thank @HareeshMR,

I will try on the approach

Cheer
CK

Thank you

1 Like