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

@kun

Hope you are doing good.

Did my reply answer your question?

If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.

Thanks!
Ankur

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

I have raised hi ticket and the hi person looked into this issue and resolved

Please share the root cause and the solution they provided

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

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Can you share details about your mail script? For example something like:

email.addAddress("cc","john.copy@example.com","John Roberts");
email.addAddress("bcc","john.secret@example.com","John Roberts");

Or you did mention something about the email log, can you share info?

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

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