Skip to Main Content
Feature Request FR-4297
Product Area APIs
Status CLOSED

82 Voters

Pre Hook Function for Apex_MAIL

shibi.ns Internal
· Feb 27 2025

Idea Summary
An enhancement that could significantly benefit APEX customers is the introduction of a Pre Hook Function for Apex_MAIL 

This Pre Hook Function would enable developers or instance admins to run custom code before sending an email via Apex_MAIL. This  would be  valuable in situations where email content or recipient details need modification or validation prior to dispatch.

It would be nice if APEX would introduce a new API that allows the registration of a Pre Hook Function at the instance, workspace, or application level. This function would filter email content and/or recipients as input parameters, granting developers the ability to update these as required.

For instance, a Pre Hook Function might verify the validity of a recipient's email address or insert dynamic content into the email body based on user input. This would enhance the flexibility and customization capabilities for developers utilizing Apex_MAIL in their applications.

Use Case
This enhancement would be particularly useful in several scenarios:

Domain-Based Email Filtering: Ensuring emails sent within the Oracle ecosystem only go to verified @oracle.com addresses to maintain security and data integrity. Lets say system send email potential sales we want to make sure its does’t goes to custiomer  

Adding Headers in Non-Production Environments: Automatically appending a header like "This mail is from the Test System" to differentiate emails from different environments.

Limiting Emails in Test Environments: When copying applications from production to non-production environments, ensuring that only subscribed users receive emails, which helps in avoiding confusion and maintaining privacy.

Scanning Emails for Security: Checking emails for security compliance before they are sent out, adding an additional layer of data protection. Liked email has SSN

These enhancements would not only increase operational efficiency but also improve security and customization, making APEX a more robust tool for enterprise environments.

Preferred Solution (Optional)
Provide filter or vpd on apex on apex mail

This request is likely a duplicate of FR-3112.

Comments

Comments

  • vincent morneau Admin OP 6 months ago

    This is an impressive number of internal votes for a new idea. The same idea has been published before, so we are closing it again for the same reasons.

  • rajesh.vig OP 6 months ago

    @vincent morneau  with move to OCI apex creates a risk where internal data can be shared outside of company domain even from a PE database via subscription or otherwise. FR-3112 was closed on premise that it is infringement on users privacy rights. I think privacy cannot superseed the data security. Please re-consider the request