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;

  • 20 Users Found This Useful
Was this answer helpful?

Related Articles

Outgoing Emails Problem (Shared Server)

Issue: Not receiving emails sent from your Apex applications. Steps to Troubleshoot: Check...

Use a Mail Client (Outlook/Thunderbird/Mail)

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

Brevo

You can create an account on Brevo (https://brevo.com) which provides a free account for up to...