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