email script
						
					
					
				
			
		
	
			
	
	
	
	
	
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
03-21-2024 01:19 AM
Hi Guys,
I have created a mail notification and added email script to include a DL in the CC.
But when the email is triggered, the CC is not in the recipient's list.
below is the code i used in email script.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
03-21-2024 07:23 AM - edited 03-21-2024 07:23 AM
Your Type parameter looks wrong. The Type parameter can either cc or bcc. Try:
          var ccd= 'GSS_XXX@yy.com';
          email.addAddress('cc', 'gss_xxx@yy.com');
Regards
Paul
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
03-22-2024 12:53 AM
Hi Paul, thanks for the response,
But i didn't use bcc. I stored mail id in ccd variable and use the variable in the addAddress function.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
03-22-2024 01:08 AM
Please use the below script and try.
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
          /* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
          /* Optional GlideRecord */ event) {
var ccd= 'GSS_XXX@yy.com';
  email.addAddress("cc", ccd, please specify the name of the user email);
   	})(current, template, email, email_action, event);
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
03-29-2024 05:59 AM - edited 03-29-2024 05:59 AM
Hello @Jayaprakash P :
Give a try to the below given script :
var ccd = 'GSS_XXX@yy.com';
email.addAddress("cc", ccd ,'name');
Also check whether you have called the email script in the body of the notification or not ? and have a look on the recipient(To)value as it should not be blank while triggering the notification. 
