ServiceNow Email Redirection Issue — How to Disable Redirection to fred.luddy@example.com?

joefernandes
Kilo Contributor

I'm working in a ServiceNow developer instance, trying to send weekly incident summary emails dynamically to each user for the incidents assigned to them. I wrote a Scheduled Script that loops through users, gets their incidents, and sends emails using GlideEmailOutbound.setTo().

However, every email gets redirected to fred.luddy@example.com, even when I explicitly set the To field to other email addresses. Here's what I've already checked and tried:


Configuration I've Done:

  • SMTP account is configured and connection test is successful

  • Outbound email is enabled

  • Cleared the “Send all email to this test address” field under Email Properties

  • Deleted these system properties (if they existed):

    • glide.email.test.user

    • glide.email.override.address

    • glide.email.test.override.address

  • Set glide.email.test = false

  • Set glide.email.outbound.enabled = true

  • Flushed the cache using gs.cacheFlush()

  • Ran GlideEmailOutbound test scripts from Script Background and Scheduled Script Execution

  • Verified that the email address I’m testing with exists in sys_user and is active


⚠️ Problem:

Even after doing all of the above, emails sent from scripts (Script Background or Scheduled Jobs) still always go to fred.luddy@example.com. No logs are created under the actual recipient’s email. This seems to happen regardless of which address I use in setTo().


2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @joefernandes 

Could you please check if Fred's email is mentioned in the email property?

 

DrAtulGLNG_0-1751226091794.png

 

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

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

pavani_paluri
Giga Guru

Please try below options:
1.Set this property to blank
Go to System Properties > Email Properties
Find or create:
Name: glide.email.test.override.address
Value: (leave it blank, don't delete it)
Then click Save.
2. Flush the cache
In the filter navigator, type:
cache.do or type gs.invalidateCache in back ground script
3. Try a simple direct test
Just to make sure it's not your script, try sending a test email using this in Script Background:
gs.email('your.email@domain.com', '', 'Test Subject', 'Hello, this is a test.');
4. Double-check system properties (just in case)
Run this in Script Background to check for any hidden overrides:
var props = [
'glide.email.override.address',
'glide.email.test.override.address',
'glide.email.test.user',
'glide.email.test'
];
props.forEach(function(name) {
gs.print(name + ': ' + gs.getProperty(name));
});

 

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P