Error when creating variables w/ Outlook Automation

While following along with the tutorial and UiPath Academy, I ran into issues in the Output->MailMessages section. I typed “email” as instructed and the variable was not automatically created. When attempting to create manually by selecting the variable type as “System.Web.Mail.MailMessage” I get the error below:


Any help would be much appreciated.

Hi, try changing the type of your variable to “System.Net.Mail.MailMessage”
I bet that’s your problem.

Hi Clayton, thanks for your quick response. Unfortunately I tried that as well, with the same compilation error - in the tutorials all of the types automatically defaulted to List, yet mine fails to do so

Oh gotcha.
You need it to be a List<MailMessage type. If you right click in the Output text box there is an option to Create a variable. That will get the type quickest. Or search for:
System.Collections.Generic.List and System.Net.Mail.MailMessage

Hope that helps!

You’re awesome, it did! Thank you

Hi all, I’m having a similar problem but the solution provided doesn’t seem to work. I don’t seem to have the List<MailMessage option… any help would be appreciated. See screen shot below.