Notifications sending from default email account instead of "From" field on notification

Josh102
Kilo Guru

Hello,

 

My org uses our own SMTP server which uses the Service Desk email address as the "From" field on the sys_email_account record. We have recently implemented HRSD, and we want to ensure that notifications in the HR category are sent using the HR mailbox instead of the Service Desk mailbox. I've gone into a test notification and set the 'From' and 'Reply To' values as the HR email address, however when the notification is triggered, it is still being sent from the Service Desk mailbox.

 

What settings should I be looking at to correct this behaviour?

1 ACCEPTED SOLUTION

Hi Atulya,

 

I appreciate your response. Thankfully I've found the cause of the issue. There was a business rule that was triggered when the sys_email record state changed to 'ready', and it would set the values of the From and Reply to fields. I'm not sure why this was initially implemented, but after disabling this business rule I have been able to change the values of the From field using either the fields on the notification, or by attaching a mail_script that calls the email.setFrom() function.

View solution in original post

5 REPLIES 5

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Josh102 

 

We had something similar requirement for one of our client but OOTB it is not possible. You may need to write script to override From and insert the new From as per requirement.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi Atulya,

 

I appreciate your response. Thankfully I've found the cause of the issue. There was a business rule that was triggered when the sys_email record state changed to 'ready', and it would set the values of the From and Reply to fields. I'm not sure why this was initially implemented, but after disabling this business rule I have been able to change the values of the From field using either the fields on the notification, or by attaching a mail_script that calls the email.setFrom() function.

Wow.. thanks for adding the update in my knowledge base. If I my response help you please do the needful.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

crjohnson36
Mega Contributor

We are trying to execute a similar rule for email generated from the Major Incident Workbench module. Currently the emails generated with a user executes a Communication Plan - Task is sending from Service Now default account.  We want to ensure that notification in the Major Incident category are sent using the 'Critical Incident' mailbox instead of the default mailbox.  How would we do this?