Issue with robot send email not working

Hi, I am facing some issues with the “To” part in sending an email and I do not know what this error is, can you help me solve this?

@caris,

Looks like To Email address is not correctly passed. Check it once.

As i have multiple email addresses i would like to send to, i put the email as a string variable. However, after running the robot, at the end it shows this error.

Hie @caris buddy pass you mail group id like this in a string variable to store multiple User IDs

hope it help
cheers Happy Automation

I assume you are using Google integration. In this case, the field will display a string array with a list of emails. You can use something like this

Hi, thanks for the suggestion, but what if i want my robot to be dynamic to read the excel file with my emails and type accordingly? This is what i have put in the “To” function

@caris,

It’s expecting array of string.

Pass it like this:

YourStringVariable.Split(";"c)

It depends on the format in which your emails are specified. If you have multiple receivers, you can separate them with semicolons without spaces and use the function I suggested (if it’s C#) or @ashokkarale (if it’s VB). If there is only one recipient, you will have an array with 1 record

Hi so sorry but i just started rpa with no coding background so im not too sure what you are trying to say


Processing: 1731940932460426715486104727603.jpg…

Is it something like this?

@caris,

Looks like your Email variable is of type List.

Email.ToArray

1 Like

I mean, if you need to get an array from a string, you can use the Split function. In this case, if you have a string

testEmail1@gmail.com;testEmail2.@gmail.com

you will receive an array of 2 emails

testEmail1@gmail.com and testEmail2.@gmail.com

If there is only testEmail1@gmail.com, then you will get an array with 1 email testEmail1@gmail.com.

Currently, from your last message you are trying to pass a list, not an array and you will get Ashok’s answer

Good luck with automation :slightly_smiling_face:

Thank you for the help, I will try these ideas.

@caris so you are sending your mail at once for all user or sending mails one by one for each person . and can you show me your excel format for the mail Part how you stored your mails .
cheers Happy Automation