Not able to send email to email.from as well as email.CC using gs.eventQueue()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 11:45 PM
I have a scenario in which if i get a email from customer to create a case. Then I trigger a event which triggers the notification to send the email body.
I have tried below code:
if (contact.next()) {
if (contact.account.u_account_segment == 'Small Enterprise') {
gs.eventQueue('event_name', null, null, email.from);
var ccEmails = email.CC.split(",");
for (var i = 0; i < ccEmails.length; i++) {
gs.eventQueue('event_name', null, null, ccEmails[i].trim());
}
}
return;
}
but i am only able to send the email to email.from . I am not getting the emails for CC people
what should i modify so that i get emails for email.from and email.CC people
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 07:52 AM
Hi @spimple
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0783517
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 08:49 AM
Hello Atul, Actually I am triggering an event using
gs.eventQueue('eventName',current,email.from); and gs.eventQueue('eventName',current,email.copied);
but I have been told that I dont need to create two queues as it will shoot two emails. they want one email wit email.from and email.copied (cc)
So in inbound email action i am triggering the even and it is assiociated with the notification which has the body.
The thing is i have been told that I should try to set CC from Notification email script.
How do i set email.from and email.copied from Email script after triggering the event?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 09:51 AM
@Sohail Khilji inputs plz.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 09:59 AM
Hi @spimple ,
Instead of using email.from or email.copied try using email.to > This actually contains email addresses from both from and cc. I hope this helps...
.
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....