- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 03:50 AM
HI,
I written mail script to change display name for notification, but it's not working and showing display name.
SCRIPT:
logs:
Date: Fri, 15 Mar 2024 03:03:56 -0700 (PDT)
From: IT Global Service Desk <CyberSecurity
CyberSecurity@xyz.com>
Reply-To: IT Global Service Desk <isupport@service-now.com>
To: receipient@xyz.com
Reagrds,
Sanju.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 11:15 AM - edited 03-15-2024 11:19 AM
Hi @Talari Balateja ,
Could you please try something like below,
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
//Changing from display name
email.setFrom("CyberSecurity <CyberSecurity@XYZ.com>");
})(current, template, email, email_action, event);
If you want to use mail script, use the format below, and make sure From is blank in Notification
email.setFrom("TEST NAME <ab@gmail.com>");
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 06:04 AM
Hi @Talari Balateja,
Please check if the From field also configured for this email notification.
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 11:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 11:17 AM
Check the reply from @swathisarang98 , if it works in your case, make sure the From field is empty.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 11:15 AM - edited 03-15-2024 11:19 AM
Hi @Talari Balateja ,
Could you please try something like below,
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
//Changing from display name
email.setFrom("CyberSecurity <CyberSecurity@XYZ.com>");
})(current, template, email, email_action, event);
If you want to use mail script, use the format below, and make sure From is blank in Notification
email.setFrom("TEST NAME <ab@gmail.com>");
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang