Wednesday, April 13, 2016

Sending email from sqlplus(pl/sql) using Apex_mail

declare
  wspace_id number;
begin

  select max(workspace_id) into wspace_id from apex_applications ;
  wwv_flow_api.set_security_group_id(wspace_id);

  apex_mail.send (
    p_from => 'me@test.com'
    , p_to => 'me@test.com'
    , p_subj => 'Send email from Pl/Sql using Apex_mail'
    , p_body => 'test test'
   );

  apex_mail.push_queue('mail.url.com', 25);
end;

No comments:

Post a Comment