Value of type cannot be converted to system.net.mail.mailmessage

hello, i have based on this RPA Video Tutorials | UiPath to actually make this work. at the first step, it already popped up with this message. unlike in the video when the admin typed in “messages” under output MailMessages then “messages” will automatically be created as a variable.

after creating the variable, this popped out. image

1 Like

Hello Cal!

If you have a look in the Error you can see that its telling you that you have a data type, but the output is expecting another sort of Data type.
Now I am not sure which way around this is (Sorry) but at a guess, it looks like the output wants a System.Collections.Generic.List(Of System.Net.Mail.MailMessage (A list of Mail Messages) and you have handled a SINGLE mail message.

Try put a list of Mail Messages in and let me know :slight_smile:

Hi,
Just hit Ctl+k and name the variable in the “MailMessages” property.

5 Likes

Hi Jordan,

Thanks for the speedy reply! I am in fact unable to locate the list mail messages here.

please advise if i’m doing something wrong.

1 Like

oh my god. thank you.

1 Like

Hi Cal,

I understand @ddpadil sorted it out for you :slight_smile:
But for the future, to find a list, you could look for an ‘Array ’ data type and for the ‘T’ then put in your MailMessage Data type.

All the best!

I am trying to resolve this error.Can anyone help?

Thanks in advance.

@sreekanth
Put just mail in that activity. It internally goes to the .Attachments collection (similarly how ForEachRow needs a DataTable, not a DataRowCollection).

1 Like

Thank you

thank you

Hi Jordan, I am unable to this can you please eloborate it

Hi @Jordan can you help me with the above problem