Error when creating variables w/ Outlook Automation


#1

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.


#2

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


#3

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


#4

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!


#5

You’re awesome, it did! Thank you


#6

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.