Hello,
DB version 19c
Apex Version 24.1
Google Workspace Enterprise
I've successfully been using Apex Mail for over a year with the same configuration. Google has (allegedly) upped its security, and as of a week ago, Apex Mail with smtp-relay.gmail.com stopped working with the error ORA-29278: SMTP transient error: 421 4.7.0. I also have a few legacy scripts using UTL_MAIL that stopped working at the same time. UTL_SMTP still works. I can go through all my apps and update them to run with UTL_SMTP, but I was really hoping to fix Apex Mail.
Google support is telling me that I need to have the smtp host as smtp-relay.gmail.com, but the EHLO must be mydomain.example.com. As far as I have googled, I don't see a way to change the host and the EHLO independently inside of Apex. Does anyone know differently?
I believe I have tried every combination of host, port, and TLS mode possible. As well as modifying the smtp relay settings in my Google Workspace domain.
Here is the UTL_SMTP configuration that is working.
l_mail_conn := UTL_SMTP.open_connection(
host => 'smtp-relay.gmail.com',
port => 587,
wallet_path => 'file:/walletpath/',
wallet_password => 'secret',
secure_connection_before_smtp => false);
utl_smtp.ehlo( l_mail_conn, 'mydomain.example.com');
utl_smtp.starttls(l_mail_conn);
Thanks