Introduction
In Oracle APEX,
managing email delivery is a critical part of many business applications,
especially those involving user notifications, password resets, workflow
confirmations, or system alerts. However, during testing or development, it’s
important to prevent emails from reaching real users. Oracle APEX provides a
built-in feature that allows developers to override the outbound "To"
email address at the application level, ensuring all emails are safely
redirected to a controlled inbox. This is particularly useful in non-production
environments where sending live emails could lead to confusion or data
exposure.
To override the
outbound email "To" address at the application level in Oracle
APEX, you can use the "Application Email Override"
feature. This forces all outbound emails from your APEX application to
be redirected to a single email address — useful for testing, QA,
or sandbox environments, so real users don’t receive emails.
How to Override Email "To" Address at the
Application Level
Steps:
Go to the APEX
App Builder.
Open your
application.
Navigate to:
Shared Components > Email > Email Configuration
Set the field:
"Override Application Primary Recipient"
Enter the desired
email address (e.g. test@yourcompany.com)
Click Apply
Changes.
What Happens:
All emails sent
using APEX_MAIL.SEND or apex_email.send from this application will have their "To"
address replaced with the override address.
The original
recipient is moved to the email header as a note (not actually used in
sending).
This is application-specific,
not workspace-wide.
If you have multiple
applications in the same workspace, you must set this for each app
individually.
Notes:
Useful for testing
email templates safely.
Does not affect
the CC,
BCC,
or Reply-To fields unless you override them too.
The override only
applies to production-mode sends, not necessarily test sends from the
APEX Builder unless run in that app context.
If Using APEX_MAIL.SEND or APEX_MAIL.PUSH_QUEUE
No need to change
your PL/SQL code. The override works automatically once set in Shared
Components > Email Configuration.
Overriding the outbound email "To" address at the
application level in Oracle APEX is a simple yet powerful safeguard during
testing and development. By configuring this setting in the application's
shared components, developers can ensure that no unintended recipients receive
messages while still validating email content and delivery. This feature
enhances testing safety, supports quality assurance workflows, and prevents
accidental communication in pre-production stages — all without requiring any
changes to the application’s PL/SQL email-sending logic.
No comments:
Post a Comment