
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2011 07:57 AM
Hello,
As explained in the documentation, it is possible to change the "From" address used by a particular Email Notification from the default one:
http://wiki.service-now.com/index.php?title=Scripting_for_Email_Notifications#Overriding_Email_Fields
This works well as long as one remembers to do email.setReplyTo() in addition to email.setFrom().
However, I am trying to change the "display name" of the "from" address. I would like a different value from the one in the 'glide.email.username' system property (e.g. 'Help Desk').
Since I see no method in the documentation or when introspecting the 'email' object, I thought I could write a "on before update" Business Rule that rewrites the headers of a sys_email record before it is sent.
And I think I succeeded, because the headers in the sys_email record do change. But when I look at the mail that arrives to my personal inbox, the headers still show the default value (e.g. "Help Desk" instead of "No reply - Help Desk" which I am trying to achieve).
Can anyone offer any help / advice?
Thanks for reading,
David
Solved! Go to Solution.
- Labels:
-
Analytics and Reports

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2015 12:34 PM
Hello Harish, Saravanan,
To clarify, you have to do the following inside the "Message" field of your Email Notification or Email Template record:
<mail_script>
email.setFrom("Display Name <some.address @ company.com>");
email.setReplyTo("Display Name <some.address @ company.com>");
</mail_script>
(without the spaces around the @ character, which I added to avoid the email address to be mis-formatted by the comments system of this website)
Best regards,
David

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2011 09:22 AM
Hello,
I found the solution: it works if you call email.setFrom and email.setReplyTo like this:
email.setFrom("Display Name ")
I thought it was worth a try and... it was 🙂
David

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2014 03:59 AM
Hi dmartinc,
Did you achieve your requirement. If yes please suggest me even i would like to do same way.
Regards,
Harish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2015 11:23 AM
HI David
I tried email.setFrom("Display Name ") , but the sender's email id is not fully overridden. I can see the sender's email id as below
DISPLAY_NAME[company@service-now.com]
I want to customize the email address as well. Any suggestion please?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2015 12:34 PM
Hello Harish, Saravanan,
To clarify, you have to do the following inside the "Message" field of your Email Notification or Email Template record:
<mail_script>
email.setFrom("Display Name <some.address @ company.com>");
email.setReplyTo("Display Name <some.address @ company.com>");
</mail_script>
(without the spaces around the @ character, which I added to avoid the email address to be mis-formatted by the comments system of this website)
Best regards,
David