Skip to Main Content

New

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

     
  1. Enable email in your APEX instance (Admin task)
  2.  
  3. Create a PL/SQL process using APEX\_MAIL.SEND
  4.  
  5. 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.

📝 Nidhi Blog

Sharing knowledge, tutorials, and stories about Oracle APEX, development, and digital growth.

📧 Contact

Email: support@nidhispace.com

Follow us on:
linkedin | YouTube


© Nidhi Blog. All rights reserved.