Dear Team,
I have tried all kind of filter expressions, But my Outlook Filter is not working. Please let me know if any chnages are reuired to be done in packages or any settings.
Thanks,
Amol Golhar
Dear Team,
I have tried all kind of filter expressions, But my Outlook Filter is not working. Please let me know if any chnages are reuired to be done in packages or any settings.
Thanks,
Amol Golhar
Hi @Amol_Golhar
Filter option in Get Outlook Mail Messages activity is not working some times. It was better to avoid to use the Filter option.
Use the Get Outlook Mail message activity to get the mails and store it in a Variable, After that use the LinQ expression to filter out those mails and store in the same variable.
After that you can use that variable for the further usage.
Hope it helps!!
Hi @Amol_Golhar , if there are multiple addresses.
Option-1
"[SenderEmailAddress] = 'example1@email.com' OR [SenderEmailAddress] = 'example2@email.com'"
option 2-
"@SQL=urn:schemas:httpmail:senderemail = 'example1@email.com' OR @SQL=urn:schemas:httpmail:senderemail = 'example2@email.com'"
Filter on outlook email specifically related to sendemail are not working most of the times
You can get all emails and then use a linq query to get required mails as below
Listmails = listmails.Where(function(x) x.From.Address.Equals("Youremailhere")).ToList
For safety before using this add an if condition to check if there is atleast one email
listmails.Where(function(x) x.From.Address.Equals("Youremailhere")).Count>0
On then side you can add the .ToList formula on else side there are no matching mails so can reintialize listmails = New List(Of MailMessage)
Hope this helps
Cheers