Email client Reply to autopopulate

Sam Ogden
Tera Guru

HI All,

On the email client, the reply to field auto populates to our service desks email address.which is where the email is sent from.

I was wondering if it is possible for the reply to to be auto populated for some departments to their own departments email address?

E.g. We have Departments 1-9

We want to configure that people in departments 1-3 the reply to is their own departments email address.  The departments reply to is still the service desk as currently happens.

 

Currently the user has the ability to manually override this information, but we have our release team who send emails to clients that are related to releases and don't need to go to the service desk.  Rather than them having to always manually change the reply to field for these users, it would be handy that for all users in the release team, the reply to was auto populated as their departments email address.

Thanks

Sam

1 ACCEPTED SOLUTION

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi,

you can do it, just right click in the form header and select Configure > Form Layout and add the "Reply to" in the Form section.

Then put the following Javascript code:

javascript:gs.getUserDisplayName()+" <"+ gs.getUser().getEmail()+">"

find_real_file.png

Hope this will be useful.

Enjoy! 🙂

If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thank you

Cheers
Alberto

View solution in original post

5 REPLIES 5

Sagar Patro
Kilo Guru

You can write a simple notification script to set the reply to field.

(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
          /* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
          /* Optional GlideRecord */ event) {

    //Write a script to check is the user is part of a department
	if( user is in the department 1 to 3)
		{
		email.setReplyTo("joe.employee@yourcompany.com");			
		}

})(current, template, email, email_action, event);

Include this the email script in the main notification using this

<div>${mail_script:name_of_notification_email_script</div>

 

Mark this as correct and helpful if it was.

Hi Sagar,

 

Thanks for the above.  So this will work on email notifications.  Is it possible on the email client - when you click the more options on a ticket:

 

Sagar Patro
Kilo Guru

For email client.

This can be configured using Email client templates.

I had a quick try but you cannot add reply-to dynamically. It is a string field unlike TO and Body fields.

Mark it as Helpful and Correct if it was.

Good Luck!

 

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi,

you can do it, just right click in the form header and select Configure > Form Layout and add the "Reply to" in the Form section.

Then put the following Javascript code:

javascript:gs.getUserDisplayName()+" <"+ gs.getUser().getEmail()+">"

find_real_file.png

Hope this will be useful.

Enjoy! 🙂

If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thank you

Cheers
Alberto