How add users in BCC from scheduled job to send report

Dasari Srihari
Tera Contributor

Hi All,

 

I'm getting users list from scheduled jobs to send report. present i'm adding users in "To". But actually we need add users list in "BCC". How we can add this emails in "BCC"

 

Scheduled job script getting users:

 

var arrayUtil = new ArrayUtil();
	arrayUtil.concat(recipients, recipientsRequestedBy);
	var finalRecipients = arrayUtil.unique(recipients);   // unique elements
	
	gs.log("finalRecipients: " + finalRecipients);

	scheduleReport.user_list = finalRecipients.join(',');
	scheduleReport.update();
3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Dasari Srihari 

you can create email script and add cc/bcc logic there and then include that email script in message part of scheduled report

https://www.servicenow.com/community/itsm-forum/how-can-i-add-bcc-cc-when-create-run-scheduled-repor... 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

 

Thanks for your responses, above post they add adding users directly in BCC. But here i have users list in scheduled job from scheduled job to email script i need pass how we can achieve this?

@Dasari Srihari 

adding cc or bcc is not available on scheduled reports

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader