The CreatorCon Call for Content is officially open! Get started here.

How to add manager dynamically in cc by using mail script

Sravani Reddy
Tera Contributor

Hello,

 

Can anyone help me with this query?

 

6 REPLIES 6

hello @Sravani Reddy try this 

email.addAddress('cc',gr.assigned_to.manager.email.toString(), gr.assigned_to.manager.name.toString());

Hope this helps 

Mark my answer as correct if this helps you

Thanks

I wonder if it's because you have the the email.addAddress() code in a loop.

Can you replace that line with

var managerEmail = gr.assigned_to.manager.email.toString();

 

and then after your loop try

email.addAddress('cc',managerEmail);