Email throws error -

Hi

I encountered an error where I need to get sender name from outlook from monday to thursday.
But it throws an error as below.
Error message: Write Line: Object reference not set to an instance of an object.

My workflow:

I put a log after this activity as Emails.Count and it returns as “34” which means a total of 34 emails received.

Then from Emails (variable), I will loop it and wanted to display the Sender’s name as below but it throws an error in the write line below: Error message: Write Line: Object reference not set to an instance of an object.

image

Can anyone help me on this?

Hi @jenkim

Has the email contains sender address name or only email id

You can check item.subject.tostring to check if the subject matches…

And also if the argument type of for each loop is system.net.mail.mailmessage

Thanks