Recipient is missing in To of a Mail from Zurich Release

Anil9866
Tera Expert

Hi SN folks,

I'm observing this behavior in my recent Zurich release instance, 
Scenario: While sending email to a user in Users table, while the user is inactive. But the same is sending in non Zurich release instances
Description: I'm triggering an email via widget server side, 

gs.eventQueue("event_Name", grScReq,to,reason);
grScReq = glideRecord object of Requested items table
to  = 

            var user = new GlideRecord('sys_user');
            user.addQuery('user_name', cUser);
            user.setLimit(1);
            user.query();
            if (user.next()) {
                email = user.email + '';
            }
var origCFM = grScReq.variables.variable_Name.toString();
            if (origCFM != '') {

                origCFM = origCFM + '@exampleDomain.com';
            }
var to=[];
            to.push(email);
            to.push(origCFM);
 
Now, in my email logs, it is saying excluded recipients because user's "Active" setting is disabled:.
when origCFM is set to inactive in Users table.
 
This behavior is reflecting only in Zurich instance, in another instance it is working as expected.
 
I'll appreciate your comments or resolution for this issue.
Thanks in advance.
 
1 ACCEPTED SOLUTION

Maham Tahir
Mega Guru

Hi @Anil9866

 

Even though you are passing a raw email string (e.g., user@domain.com) in your gs.eventQueue parameters, the ServiceNow Email engine automatically looks up that email address in the sys_user table. If it finds a matching user record that is inactive, and the system is configured to ignore inactive users, it will drop the email with the "excluded recipients" error

 

You need to check/update a specific System Property that controls this behavior.

 

Note: If you are on a new release like Zurich, security settings are often hardened by default, which is why this property may be enforcing the restriction now where it wasn't before.

 

If you find my response helpful, mark it as helpful and accepted solution.

 

Regards, 

Maham Tahir.

View solution in original post

10 REPLIES 10

Hemanth M1
Giga Sage
Giga Sage

Hi @Anil9866 ,

 

I would like to understand why you want to send emails to inactive recipients?

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

.

Hi @Hemanth M1 
thanks for looking into the query,
I really agree with you, but here I'm more focused on the mail is adding the same user in CC when triggered from Email script, but it is neglecting the same user when configured in Email notification as Send Email to parm1.
Sorry, if I wrongly routed you in between.

Maham Tahir
Mega Guru

Hi @Anil9866

 

Even though you are passing a raw email string (e.g., user@domain.com) in your gs.eventQueue parameters, the ServiceNow Email engine automatically looks up that email address in the sys_user table. If it finds a matching user record that is inactive, and the system is configured to ignore inactive users, it will drop the email with the "excluded recipients" error

 

You need to check/update a specific System Property that controls this behavior.

 

Note: If you are on a new release like Zurich, security settings are often hardened by default, which is why this property may be enforcing the restriction now where it wasn't before.

 

If you find my response helpful, mark it as helpful and accepted solution.

 

Regards, 

Maham Tahir.