Error in Condition - IF (Email Automation)

Hello!

I started on my 1st project and i see there is one error in If condition of my project. I am working on Email attachment download automation.

i defined 3 variables - Email,password and GetMailMessages.

Then i assigned Get IMAP and attached a FOR with IF inside it. In condition of IF i am seeing this error.

Am i doing something wrong here?

Please let me know.

@Pawan_Gawali

Change if condition with mail.Subject.Contains("")

Still says the same issue.

Hi @Pawan_Gawali !
Be sure that in your foreach loop, the type argument (in properties) is set to System.Net.Mail.MailMessage
Then your if condition will work with the following condition:
mail.Subject.tostring.Contains(“whateveryouwant”)
not sure if .tostring after subject is optional or necessary

1 Like

Thank You! I was able to run it and now my automation is working perfectly! :slight_smile:

That’s great !!
Don’t forget to close the topic as marking it resolved, so that we could focus only on unresolved topics :grin:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.