Use Apex_Mail.Send in Scheduled Jobs

You can send emails outside Apex and from scheduled jobs. All you need to do is to use wwv_flow_api.set_security_group_id; before apex_mail package as shown below:


begin

wwv_flow_api.set_security_group_id;
APEX_MAIL.SEND( p_to => 'to@youremail.com' , p_from => 'from@youremail.com' , p_subj => 'Subject here', p_body => 'Body here');
APEX_MAIL.PUSH_QUEUE;

end;

  • 19 Users Found This Useful
Was this answer helpful?

Related Articles

Outgoing Emails Problem

If you are not receiving the emails sent from your Apex applications, make sure they are not...

Use a Mail Client (Outlook/Thunderbird/Mail)

To use a mail client on your desktop such as Outlook, Thunderbird, Mail, etc to send/receive...