Is there a way to dynamically change the Outgoing mail display name?

steveguida
Kilo Explorer

Is there a way to dynamically change the Outgoing mail display name? There is only one choice in the System Email Properties. We are an MSP and I would like to dynamically change this for a company/domain.

1 ACCEPTED SOLUTION

Steve McCarty
Mega Guru

I don't know of a way to do it globally, but you can change the from or reply to addresses on individual notification emails.   There is a field on the notification form that you can fill in to change it to a static address for that notification, or you can change it dynamically in a mail script.   If you created a mail script that sets the from address based on some information on the current record, you could then add that script to a number of different notifications.   You may have to create a couple of different scripts for notifications from different tables, but you could reuse them for any table with the same field names for the company or user.   Scripting for Email Notifications - ServiceNow Wiki has a description of the email object you would need to use at the bottom of the page.



-Steve


View solution in original post

6 REPLIES 6

Patrick DeCarl1
ServiceNow Employee
ServiceNow Employee

Steve,



The only way I know is "setFrom" via the mail script api. Link below.



Scripting for Email Notifications - ServiceNow Wiki


Thanks Patrick Between the responses you and Stephen provided I hope to get something to work. Will let you know how it goes. Thanks for taking the time.


Steve McCarty
Mega Guru

I don't know of a way to do it globally, but you can change the from or reply to addresses on individual notification emails.   There is a field on the notification form that you can fill in to change it to a static address for that notification, or you can change it dynamically in a mail script.   If you created a mail script that sets the from address based on some information on the current record, you could then add that script to a number of different notifications.   You may have to create a couple of different scripts for notifications from different tables, but you could reuse them for any table with the same field names for the company or user.   Scripting for Email Notifications - ServiceNow Wiki has a description of the email object you would need to use at the bottom of the page.



-Steve


Thanks Stephen. Appreciate the response. Will try it out and let you know if I am successful.