Apex Mail queue won't send eMail
I recently had an issue where the Apex production mail queue stopped sending emails related to the above discussion.
I checked the queue from INTERNAL workspace and had over a 1000 emails in the queue. I updated "Maximum Emails per Workspace" to 10000 just in case this was the reason for the blockage and tried to send all mails from queue.
The process came back with success messasge but all emails were still sitting the queue.
- We recreated the ACLs
- Ran a UTL_SMTP process on the database to check that the emails could get out of the database
- Ran APEX_MAIL.PUSH_QUEUE to try and force them through
None of these actions worked. The setup of the instance was exactly the same as the test environment that was still sending emails.
On logging call Oracle Support included a reference to Doc ID 1565351.1
The background job ORACLE_APEX_MAIL_QUEUE had got stuck at a status of "RUNNING" and wouldn't allow new instances to run. This could be checked by querying the Scheduled job in the APEX_040200 schema.
The resolution is to drop the scheduled job and recreate.
In SYS
EXEC dbms_scheduler.stop_job ('APEX_040200.ORACLE_APEX_MAIL_QUEUE',force=>true);
EXEC dbms_scheduler.drop_job ('APEX_040200.ORACLE_APEX_MAIL_QUEUE');
Alter session set current_schema = APEX_040200
exec APEX_040200.wwv_flow_upgrade.create_jobs('APEX_040200');
Hope this helps with anyone with this problem in the future :-)