Sorry for the late reply. I’m a new user so I couldn’t reply anymore until my account was released from its restrictions.
If I’m understanding you correctly, it sounds like you have retrieved a list of mail messages and are looping through them possibly using a For Each activity. The syntax would be similar to For each item in Enter a VB expression.
Mail.Subject.contains is not an action or activity but more of a filter. In this case, if you were to leave the item as default, you could use item.subject.contains rather than mail.subject.contains since item/mail contains the individual record in the list of emails.
To call the function, you could do something like, item.subject.contains(“word to search for”).
I will share with you the sample that I am trying to follow but the activity is not available to select in my installation. I am sure that there is a package that I have not installed.
Problem statement :- I need to identify emails with the subject containing Statements which have attachments.
Download and save the attachments to a folder and then extract the text from the PDF attachments.
I’m not sure if you’re looking for the text “Statements which have attachments” in the subject line or if you are looking for emails with attachments. In any case, you will need theUiPath.System.Activities package listed on the Project tab.