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

email.addAddress() is not working

kun1
Tera Expert

Hi Team,

In the notification, i have added one email script which contain "email.addAddress() function. We need to send mail to CC person also . In activity log, i am able to see that user name is there as a cc but user told me that he is not received any notification.

Please guide me.

14 REPLIES 14

Hi,

please share the script which you are using to set that

Regards
Ankur

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

var gr0 = GlideRecord("approvals");

gr0.addQuery('install_status', '1');
gr0.addQuery('monitor', true);
gr0.addQuery('u_segment', current.variables.segment);
gr0.addQuery('attestation_score', '<=', parseInt(current.variables.estimatedShipmentCostUsd, 10));
gr0.addNotNullQuery('location');
gr0.addQuery('u_pbu', current.variables.pbu.getValue());
gr0.addQuery('u_plant_code',current.variables.plantCodeAndPlantName.getValue());
gr0.addQuery('u_cbu', current.variables.cbu.getValue());
gr0.query();
while(gr0.next()){
email.addAddress("cc", gr0.assigned_to.email, gr0.assigned_to.name);
}

 

In the activity log, i am able to see that user receive notification

Hi,

Did you check for other users in cc are getting notification?

If yes then this user has issue in notification or user preference or inform that user to check in Outlook or mail box settings some issue might be there as well.

Regards
Ankur

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

For CC, can i get log some where?

Hi,

if you are able to see that user's email in the Copied column in email logs it means it is picking correctly.

please check the points I mentioned above

Regards
Ankur

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