We have an Apex 4.2.5 instance and I have set up an smtp server
SMTP_HOST_ADDRESS = our email server
SMTP_HOST_PORT = 25
An ACL is created so that APEX_040200 can connect to the server
When I send an e-mail using apex_send_mail, a new record is added to apex_mail_queue
but when I do push_queue, nothing happens. No error in apex_mail_queue, no records in apex_mail_log, nada.
I have set the security_group_id in advance. But the push_queue doesn't seem to pick up the newly added row.
Is there any way to debug the process?
here's the code I used:
DECLARE
l_body CLOB;
begin
for c1 in (
select apex_util.find_security_group_id (p_workspace => 'MY_WORKSPACE') as workspace_id from dual)
loop
apex_util.set_security_group_id(p_security_group_id => c1.workspace_id); end loop;
-- Example One: Plain Text only message
l_body := 'Thank you for your interest in the APEX_MAIL package.'||utl_tcp.crlf||utl_tcp.crlf;
l_body := l_body ||' Sincerely,'||utl_tcp.crlf;
l_body := l_body ||' The Application Express Dev Team'||utl_tcp.crlf;
apex_mail.send(
p_to => 'to_addresss', -- change to your email address
p_from => 'from_address', -- change to a real senders email address
p_body => l_body,
p_subj => 'APEX_MAIL Package - Plain Text message-test 1');
apex_mail.push_queue;
exception when others then
dbms_output.put_line('jammer '||SQLCODE||' '||SQLERRM);
end;
/
apex_mail_queue, 1 extra record, mail_send_count =0 mail_send_error = NULL
apex_mail_log is empty
Ran push_queue in a separate plsql block to no avail (setting the security id first ofcourse)