Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Placing a display name and email in the from to field does not show display name

plallema
Tera Expert

Creating a notification to send out to clients and i want to change the email and display name of the notification as we don't want clients to see the service-now domain. When I fill in the From field on the notification with "Display Name<clientinquiry@mycompany.com>", the email received only shows the email address but not the display name. I tried doing it via email script using email.setFrom and got the same result. Any clue why this is happening?

1 ACCEPTED SOLUTION

Hi Michael,


        Thanks for the response. I am perplex as to why when I only place a string in the From field, it replaces the display name in the email with what is in the System Properties - email properties. I want to refer you to Section 5: Scripting for Email Notifications - ServiceNow Wiki . I assume that scripting api "setFrom" and the field it refers"From" to act in the same manner. The email outbound object description states:



"The email address that is passed by setFrom and setReplyTo needs to be in a valid form such as 'helpdesk@sn.com' or 'Display Name <helpdesk@sn.com>'. If the email address includes a 'Display Name', then that value overrides the instance's display name."




I have tried the display name and email address combo in both the field and in an email script and my result is always an email address display only.



As I was writing this response pointing out the valid format I discovered my error was in the format. There needs to be a space between Display Name and the email address. 'Display Name <email@company.com>'. So the From field can take both display name and email address the format is crucial.


View solution in original post

2 REPLIES 2

Michael Fry1
Kilo Patron

The From field only takes an email address. That's why it's not showing. Section 14: Email Notifications - ServiceNow Wiki


Hi Michael,


        Thanks for the response. I am perplex as to why when I only place a string in the From field, it replaces the display name in the email with what is in the System Properties - email properties. I want to refer you to Section 5: Scripting for Email Notifications - ServiceNow Wiki . I assume that scripting api "setFrom" and the field it refers"From" to act in the same manner. The email outbound object description states:



"The email address that is passed by setFrom and setReplyTo needs to be in a valid form such as 'helpdesk@sn.com' or 'Display Name <helpdesk@sn.com>'. If the email address includes a 'Display Name', then that value overrides the instance's display name."




I have tried the display name and email address combo in both the field and in an email script and my result is always an email address display only.



As I was writing this response pointing out the valid format I discovered my error was in the format. There needs to be a space between Display Name and the email address. 'Display Name <email@company.com>'. So the From field can take both display name and email address the format is crucial.