How to Send Emails with APEX_MAIL in Oracle APEX
Published on 11 Jul 2025 by CHATURVEDINIDHI26@GMAIL.COM
How to Send Emails with APEX\_MAIL in Oracle APEX
📧 Introduction
Oracle APEX allows you to send emails directly from your application using the APEX\_MAIL
package. Whether you need to send notifications, confirmations, or newsletters, it’s all built-in.
🛠️ Steps to Send Email
- Enable email in your APEX instance (Admin task)
- Create a PL/SQL process using
APEX\_MAIL.SEND
- Call
APEX\_MAIL.PUSH\_QUEUE
to send it immediately
APEX\_MAIL.SEND(
p\_to => 'user@example.com',
p\_from => 'admin@nidhispace.com',
p\_subj => 'Welcome to Nidhi Blog!',
p\_body => 'Thank you for subscribing.',
p\_body\_html => '<h1>Welcome!</h1><p>Thanks for joining.</p>'
);
APEX\_MAIL.PUSH\_QUEUE;
✅ Best Practices
- Use templates for formatting
- Use \`p\_body\_html\` for modern design
- Check email logs in Shared Components → Mail Queue
📬 Wrap-Up
That’s it! With just a few lines of PL/SQL, you can automate emails from your APEX app. Try it for confirmations, newsletters, or alerts.