Idea Summary
It would be very handy if we could capture the emails and controle the decision to send them or capture them in a table
Use Case
We never want to send emails from dev/uat/stage. But we do need to test and check the message bodies, recipients, etc as part of unit testing.
Preferred Solution (Optional)
Similar to the “Error Handling” function under Application Definition > Error Handling. This would allow a user to specify a custom package with the same signature as apex_mail. The package could then be a wrapper around apex_mail, controlled by an application setting (or custom code) and allow email to be ignored/saved to table/sent.