Email with underscore

Hi! My company laptop is using a slightly older version of UiPath so my “Get Outlook Mail” activity doesn’t work like the filters of the newest version. So I have to filter the emails using this: “[SenderEmailAddress] = ‘…’”. I notice that it doesn’t work with emails with underscores in them. How do I fix this problem?

Hi @Tiffany_Sajoto

Check the below thread

Regards

Hi there!

In this scenario, I want to retrieve certain emails containing an underscore this time.

Hi @Tiffany_Sajoto

What is your exact requirement which email you want to filter out.

Regards

I want to retrieve emails only from the address tom_anderson@corp.com. I tried “[SenderEmailAddress] = ‘tom_anderson@corp.com’” which doesn’t work

Hi @Tiffany_Sajoto

Do the same process after Get outlook Mail Messages use the below syntax in Assign activity:

filteredMails = mails.Where(Function(mail) mail.SenderEmailAddress.Equals("tom_anderson@corp.com")).ToList()

After that run For Each loop to iterate through filteredMails.

Regards

Hi @Tiffany_Sajoto

Try this

Assign filteredEmails = emails.Where(Function(email) email.From.Address = "tom_anderson@corp.com").ToList()

Hope it helps!!