Sender Mail Address filtration not working in Get outlook mail message activiy

Hi All,

I am using get outlook mail messages activity to get the mails from the outlook. In this I have filtered the mails with Sender mail address by giving the filter expression in the activity. I tried with the below expression but it’s not working.

"[SenderEmailAddress]='abc@gmail.com'"

Please provide me the other filter expression.

I am thanking you all in advance…

Try using a Matches activity and assigning the result to a variable.
Hope it helps!

"@SQL= (urn:schemas:httpmail:sendername = "

try this`

Hi @mkankatala

Try this:
msgs=msgs.Where(Function(x)x.Sender.Address.ToString.ToLower.Contains(“abc@gmail.com”)).ToList

Hi @mkankatala

Try this

Regards,

Hi @mkankatala

Try with this exp

Try this:
Store it into variable and pass
msgs=msgs.Where(Function(x)x.Sender.Address.ToString.ToLower.Contains(“abc@gmail.com”)).ToList

Hope it helps!!

Hi Community!!
@Anil_G @Yoichi @ppr @supermanPunch @Srini84 @vrdabberu

Is there anybody there to give me more solutions for this querey.

@mkankatala

Please try this

"@SQL=urn:schemas:mailheader:fromemail = 'emailid'"

Or

"@SQL=""urn:schemas:mailheader:fromemail"" = 'emailid'"

Cheers

Hi @Anil_G

I have tried the both expressions but those are not working. Check this once.

@mkankatala
Did you Try this one:
"[From] = 'abc@gmail.com'"

@mkankatala

My Bad…please use this…Just checked and it is working as expected

"@SQL=urn:schemas:httpmail:fromemail = 'notifications@uipath.discoursemail.com'"

instead of mailheader use httpmail

This supports like as well for partial email

"@SQL=urn:schemas:httpmail:fromemail LIKE '%notifications@uipath%'"

cheers

I’ve been experiencing the same issue as the original post. When I attempt your solution: “@SQL=urn:schemas:httpmail:fromemail LIKE ‘%notifications@UiPath%’” it is failing, but if I remove the @ symbol I get a response. Is there something to this syntax that needs to be escaped?

@Sean_Tosloskie

For few cases we have to use "@SQL=""urn:schemas:httpmail:fromemail"" LIKE '%notifications@uipath%'" with double quotes

cheers

No @Anil_G

These two are also not working for me. I have tried using the two expressions but I can’t get it.

@mkankatala

Is it failing or does it not return the data as expected?

can you show a screenshot of how it is being used

What are the outlook and mail versions?

did you try changing the mail package version

cheers

I am taking the output from get outlook activity and check the count of mails.
Mail package version is 1.20.2 which is the updated version, I have tried with downgraded version.

Thanks @Anil_G

@mkankatala

can you share a screenshot?

count also would be effected by to and limit also

so please check if the individual emails returned are satisfying filter condition

cheers

Check the properties here.
The mail is in the Inbox folder, it is unreaded, it was in the top 10.

@mkankatala

So you are getting 0 as output mails?

can you show the filter as well…you used with like and included % ? or used = with exact mail id?

cheers

image

Here is the filter expression