How to Send email copying (cc) from rows("code") as Cc recipients

Hi devs, I will like to send emails copying recipients from excel file but got confused as I will be reading each row and using as Cc recipient. Sample file is attached below
test2.xlsx (8.6 KB)

Hello,

You want to send separate mail for each recipients, or a single mail cc’ing all the recipients from excel?

Thanks!
Athira

I am sending same mail for each recipients but in some cases I send to all recipients.

1 Like

Hello,

If you are sending for each recipients, inside for each row you can get the mail id and use send email activity.

If you are sending the mail together to all the recipients, inside for each loop use an assign activity and append all the emails together like this:


Don’t forget to initialise the CCEmail variable will empty quotes (“”)
In the end, pass the variable to cc property while sending mails.

Thanks!
Athira

3 Likes

Hey @RPA-botDev

If you want to send for all recipients at once, kindly try the below…

String.Join(";", dt_Mails.AsEnumerable.Select(Function(row) row("CodeEmail").ToString.Trim))

Pass the above statement in the send mail CC property.

Hope this helps.

Thanks
#nK

4 Likes

Thanks Nithinkrishna, Regards

1 Like

Cool @RPA-botDev :slightly_smiling_face::+1: