I'd like to capture all email events in Magento before they're sent and prevent magento from sending them.
I know I can disable all emails under system > mail sending settings
, but this is not enough. I want to send data from that email to another system.
Something like this:
- Magento wants to send email
- Some method captures the email
- Same method prevents magento from sending the email
- Same method sends data through api to another system
How can I achieve this?