How can I fix the compiler error in MailMessage(0)

Hi All,

I ran my first project and got the error below regarding the MailMessage! It is copied from the tutorial video, so I am not really sure why it’s not working!

Thanks in advance for your help.

Hi

Let’s validate whether you received any mail message from the output of get mail activity
Before to that save mail activity where the error is occurring use a writeline activity and mention like this

Mailmessages.Count.ToString

If the count is more than 0 then you have some mails in that variable
If not let’s check the GET MAIL activity itself

Cheers @Aida_Azar

1 Like

@Aida_Azar

Can you check Account value is showing as null
First validate whether you are getting the mails by using below
Mailmessages.Count.ToString

Hope this may help you

Thanks

1 Like

Did that work and is there any further issue
@Aida_Azar

No not yet :confused: . It gives me more errors when I try to change the command as per your advice.

No worries
Can I see the error
@Aida_Azar

Hi,

I finally managed to solve it getting help from my manager. Thank you :slight_smile:

1 Like

Great
Can you mention the solution you made so that it would help others
Or if you find the appropriate one in the above comments pls mention as solution

@Aida_Azar

Sure,

The solution was actually quite simple! I requested to read unread messages only. In my outlook, every time before running the project, I had to mark my email in outlook as unread.

1 Like

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