Is there a counterpart of this for 4.0 or later?The email package is now called APEX_MAIL. Here is the documentation for it:
Why can not i test it on sqlplus? I want to send mail thru DBMS_scheduler and not in apex page.
SQL> DECLARE 2 l_body CLOB; 3 BEGIN 4 l_body := 'Thank you for your interest in the APEX_MAIL 5 package.'||utl_tcp.crlf||utl_tcp.crlf; 6 l_body := l_body ||' Sincerely,'||utl_tcp.crlf; 7 l_body := l_body ||' The APEX Dev Team'||utl_tcp.crlf; 8 apex_mail.send( 9 p_to => 'email@example.com', -- change to your email address 10 p_from => 'firstname.lastname@example.org', -- change to a real senders email address 11 p_body => l_body, 12 p_subj => 'Test EMAIL from APEX'); 13 END; 14 / DECLARE * ERROR at line 1: ORA-20001: This procedure must be invoked from within an application session. ORA-06512: at "APEX_040000.WWV_FLOW_MAIL", line 290 ORA-06512: at "APEX_040000.WWV_FLOW_MAIL", line 325 ORA-06512: at "APEX_040000.WWV_FLOW_MAIL", line 367 ORA-06512: at line 8 SQL> begin 2 APEX_MAIL.PUSH_QUEUE; 3 end; 4 / PL/SQL procedure successfully completed.
KinsaKaUy? wrote:It helps if you read the documentation. It helps more if you read the documentation for the current version rather than searching out obscure references from 8 versions ago.
I read that already. My question is the above wont run on command line, so it will not also run when set on schedule. :(