How to add a group in "CC" in an Email Notification?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 01:33 AM
Hi,
I have one requirement: I need to add a group to the 'CC' in an email notification using an email script.
Note that - this group doesn't have an email ID, so I need to send the email to the individual members of the group.
For example, if there is a group called 'Global' with five members, I need to add those five members to the "CC"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 02:32 AM
@Community Alums
See if you don't have group email i'd then you can write the each member name and email i'd in email-script .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 02:40 AM
If there are 100 members in the group then we can't mention 100 member
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 02:44 AM - edited 09-18-2024 02:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 02:50 AM
Hi @seethapathy
Note that - this group doesn't have an email ID, so I need to send the email to the individual members of the group.
For example, if there is a group called 'Global' with five members, I need to add those five members to the "CC"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 03:23 AM
if you have multiple recipients try below script in email script
if(!current.recipient.nil()){
var watcherIds = current.recipient.split(",");
var user =new GlideRecord("sys_user");
user.addQuery("sys_id", watcherIds);
user.addQuery("email","!=","");
user.query();
while(user.next()){
email.addAddress("cc", user.email, user.getDisplayValue());
}
}
if this script is helpful mark it as helpful and accepted solution