How can I redirect all emails from HRSD to a specific email in Production environment instead.

TahiraS
Tera Expert

We don't want the HRSD emails to be sent out in Prod and need a temporary redirection of HRSD emails to a specific email rather than going to the specified groups and users defined in the notifications.

4 REPLIES 4

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @TahiraS As per OOTB behavior, you can set a shared email in the email properties — but in that case all emails will go to that shared mailbox instead of individual mailboxes.
If you’re looking for a temporary solution, it’s better to set email_active = false for HRSD so that no emails are triggered.

*************************************************************************************************************
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]

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

DrewW
Mega Sage
Mega Sage

This has its issues but you can use an on insert BR on the sys_email table to change the recipients to the email address you would like to receive the messages and then disable the BR when you no longer want the redirect.

 

Aniket1498
Giga Guru

Hi @TahiraS ,

 

1. Check all the notifications that are current under sn_hr_core scope.

2. Create one group with the specific mail box id.

3. Set the 'Who will receive' to the group for all the notifications.

 

In this way the notifications can be redirected to a specific email address.

 

Mark this as helpful or Accept the solution if this solves your issue.

 

Thanks & Regards,

Aniket Dey

jcmings
Mega Sage

There is a system property (search Email Properties) that allows you to send all emails to a test email address... it does note that it's for non-production testing though, so I'm not sure if it will work in your PROD environment. Further, it wouldn't apply to only HRSD. If you don't want to send out any emails at all, you can disable email sending.

 

If you're hoping to apply this to only HRSD... you may need to modify the notification records themselves. I'd recommend doing this in an update set in a lower environment, and then capturing the reversion in a different update set (so you can revert all changes easily).

 

There is a sys_job called SMTP Sender (sys_id: d8e37da5c0a80064009ff6d19882218a) which has a Java Class of SMTPSenderJob -- but I'm not sure if it's possible to modify that.

 

You could also potentially intercept emails that go into the Outbox and change the recipient via script. I'm not entirely sure how the jobs work or the timing. I believe your script would look for send-ready type emails and have to modify the recipients field. Probably in a BR.

 

Curious to see what you end up doing!