- 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 11:49 AM - edited 03-15-2024 11:50 AM
<mail_script>
email.setFrom("Display Name <adress @ company.com>");
</mail_script>
(Ensure without the spaces around the @ character)
Regards,
Shyamkumar