We are currently facing intermittent email delivery failures from our Oracle APEX 19.2 environments when sending emails using Gmail relay SMTP.
As per our technical support partner, and based on their analysis of the SMTP logs, they have identified that our server connection pattern is being interpreted as a Denial of Service attack. Specifically, APEX establishes an SMTP connection, sends a single email, issues a QUIT command, immediately disconnects, and then reconnects to send the next email. When multiple emails are sent within a very short timeframe, this rapid connect disconnect reconnect pattern triggers Googles DoS protection, resulting in SMTP 421 errors and rejected emails.
Google has recommended that the sending application reuse SMTP connections so that multiple emails are sent over a single session, either by keeping the connection open for a defined number of messages or for a defined time period.
However, based on our understanding and testing, Oracle APEX 19.2 does not support SMTP connection reuse or session pooling. Each email is sent over a separate SMTP connection by design, and there does not appear to be any instance parameter or configuration option available in this version to control connection reuse, batching, or connection duration.
Given this we are looking to understand:
- Is SMTP connection reuse or caching supported in Oracle APEX 19.2 in any form
- If not, is SMTP connection reuse or caching supported in any version of Oracle APEX in any form? (We have taken a look at 24.2 and this appears to behave in the same way)
- If not supported, what is the recommended workaround to avoid SMTP DoS detection by providers such as Gmail?
Thank you in advance!