Configure Oracle 11.2+ ACL to work with mail server having an internal IP address
Here's what I finally (!) got to work. Simply set smtp_out_server equal to mail.example.com, then add mail.example.com to the ACL using, from SQLDeveloper:

-- leave &lt;lower|upper&gt;_port null to allow access to all ports
exec dbms_network_acl_admin.assign_acl (acl =&gt; 'http_permissions.xml', host =&gt; '*.example.com'); 
commit;


Notice above that I used *.example.com instead of mail.example.com because doing it this way also allows UTL_HTTP requests to www.example.com (kill 2 birds with one stone). Also, by not specifying upper and lower port bounds, we enable access for all ports. If you want, you can specify the exact ports as done in the original posting above.

Here's the UTL_SMTP related code:

g_mail_conn := UTL_SMTP.OPEN_CONNECTION('mail.example.com', 26);
UTL_SMTP.EHLO(g_mail_conn, 'mail.example.com');
UTL_SMTP.MAIL(g_mail_conn, p_sender_email);
...


Note that I'm using port 26 for SMTP, whereas most of the world uses port 25 (so just update your code accordingly). Also, there's no authentication (e.g. username/password) for the non-SSL port (26; no need, since I'm using an internal IP address).

The UTL_MAIL command also works from SQLDeveloper:

exec utl_mail.send(sender =&gt; 'name1@example.com', recipients =&gt; 'name2@example.com', message =&gt; 'Hi there');