Need help sending mail to To and CC using email script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 11:08 PM
Hello Devs
I have a requirement where I have Inbound email action in which I am triggering the Event which triggers the notification.
Inbound email action code :
var cnt = new GlideRecord('contact');
cnt.addQuery('email', email.from);
cnt.query();
var sender = email.from;
if (cnt.next() && !(sender.includes('@example.com'))) {
if (cnt.account.u_account_segment == 'Small Enterprise') {
gs.eventQueue('prevent_case_creation',null,email.from);
// gs.eventQueue('prevent_case_creation',null,email.copied); // I cant use two Queues
}
return;
}
This code triggers the event and notification.
So the requirement is I dont only need to send the email to : email.from i.e. sender I need to send the email to Copied users too (email.copied) and I cannot use two eventQueues.
So i have been suggested to do it through email script like fetch the email.from and email.Copied from the event and send the email from the mail script as body is already defned in notifiction.
Can someone please help me ?
Can someone please help me ?
Thanks
0 REPLIES 0