SMTP Sender Processing Time - how to reduce processing time or increase threshold?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2023 07:48 AM
Hi we are conifguring IMAP and SMTP email accounts via OAuth2.0.
We keep getting an error on test connection and Email sending non operational when the SMTP email account is authorised and active.
We managed to get a successful test connection and the email account was operational for 2 hours. The processing time at the time of success was 4ms and hovered around 5000ms. It then went back up to 20,000ms and has been 20,000ms since. We believe this is what is causing it to be non operational, it seems that once it goes past a certain threshold it makes it non-operaitonal. Can anybody please help to reduce this processing time or reduce the threshold?
We have already tried the following, however the system properties dont make a difference and processing time still high and email sending still non-operational: https://support.servicenow.com/kb_view.do?sysparm_article=KB0523573#POPrunning
IMAP is working perfectly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 01:37 PM
Hi,
did you solve this?
I'm having the same issue in my PDI.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 04:34 PM - edited 08-24-2023 04:38 PM
Hello @Daniel R2,
One possible cause of the error on test connection and email sending non-operational is that your email server or provider has some rate limits or throttling policies that prevent too many requests from the same source in a short period of time. This may explain why your email account was operational for 2 hours and then became non-operational again. You can check with your email server or provider if they have any such limits or policies and how to adjust them.
Another possible cause of the error is that your OAuth2.0 tokens are not being refreshed or renewed properly. OAuth2.0 tokens have an expiration time after which they become invalid and need to be refreshed or renewed using a refresh token or a new authorization request. If your tokens are expired, you will not be able to connect to your email server or send emails. You can check the status of your tokens in ServiceNow by navigating to System OAuth > Tokens and looking for the tokens associated with your email accounts. You can also manually refresh or renew your tokens by clicking the Refresh Token or Renew Token buttons on the token record.
A third possible cause of the error is that your email account configuration is not correct or compatible with your email server or provider. You need to make sure that you have entered the correct server name, port number, connection security, and OAuth profile for your email accounts. You can also try to use different settings or protocols, such as POP3 instead of IMAP, or SSL/TLS instead of STARTTLS, to see if they work better with your email server or provider .
Hope this helps.
Kind Regards,
Swarnadeep Nandy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2023 08:17 AM
@SwarnadeepNandy Thanks for the reply, we actually found the reason for this issue, actually a couple days after the original post, thanks for the comment that is really useful. @Diana Cunha I will add the solution of this experienced issue for us below.
The reason this was happening for us, was because of a daily script which was disabling the SMTP auth of the email address. Our Mail admin was enabling SMTP auth on the specific email account, as per the below documentation and screenshot, which is the correct thing to do. This would then mean we could activate SMTP auth, and connection was successful. However our client also had a script that ran every 24 hours, which then disabled the SMTP auth again. Once the mail admin added the email address as an exclusion to that script. It has worked ever since, our mail setup has been up and working for almost 5 months now with no issues.
The documentation below helps with just clarifying that SMTP auth is set up correctly on specific email address on mail admin side. However, please also check with them in case they have a script which is then automatically disabling SMTP auth again, and if so make them add the email address as an exclusion