Skip to Main Content

problem getting connected to host javamail in oracle database

Frank LehmannNov 29 2022 — edited Nov 29 2022

i have a problem getting mail folder connect within the database using java stored procedure.
My own mailserver is in the same subnet like my database server is.
IP of mailserver is
IP of server with database is
When i connect with package "plsql_mail_client.1.1.5" from database to mailserver, then it is working fine and i can get all mails in the mailbox.

But when the mailserver is outside my own subnet or ip range, then i am getting error :
ORA-29532: Java-Aufruf durch nicht abgefangene Java-Ausnahme beendet: com.sun.mail.util.MailConnectException: Couldn't connect to host, port:, 993; timeout -1;
nested exception is: Operation timed out
ORA-06512: in "SYS.MAIL_CLIENT", Zeile 16
ORA-06512: in "SYS.MAIL_CLIENT", Zeile 35
ORA-06512: in Zeile 24
29532. 00000 - "Java call terminated by uncaught Java exception: %s"
*Cause: A Java exception or error was signaled and could not be
resolved by the Java code.
*Action: Modify Java code, if this behavior is not intended.

And there is no firewall setting blocking server ip or port number.
The permission for is set ""
dbms_java.grant_permission( '<SCHEMA>','', '*', 'resolve,connect');

And testing same connection outside the database with a testcase it is working fine also.
Testing for example with telnet 993 is working fine also.

Any hints why the database is blocking connection to servers outside my ip range ?

Post Details
Added on Nov 29 2022