- Email send fails with error "com.sun.mail.smtp.SMTPAddressFailedException: 452 4.5.3 Error: too many recipients" in system logs.
- The email in question is set to Send-Failed.
- The number of email recipients in the email is greater than 1000.
Please note that this is applicable only in cases which have custom scripts that use GlideRecord to create email record and passes email addresses to the To: field. In this case, the script bypasses the recipients per email functionality defined by 'glide.email.smtp.max_recipients' in any other way.
ServiceNow email server limits a single email's recipient count to 1000.
'glide.email.smtp.max_recipients' should never be set larger than the number the mail server can support, which in the case of ServiceNow is 1000.
the scripts fall under customizations and are beyond scope for ServiceNow Support to troubleshoot/improve.
Here are our recommendations:
- (Recommended) Explore using the GlideEmailOutbound object instead of GlideRecord in the custom script since it should respect the system property 'glide.email.smtp.max_recipients' and split the needed emails. Upon calling 'GlideEmailOutbound.save()' to send the record, the chunking will be handled automatically for the emails.
- Explore using the system property 'glide.email.smtp.max_recipients' in the custom script and duplicate this splitting functionality in your custom code to ensure any single email's recipient count does not exceed the property value.