Due to company's security set up of the emails coming from the external hosting, it's needed to send password reset emails through internal email server, for that the email content needs to be sent to a secure Web API and the following needs to happen:
- Hook into Wordpress password reset functionality
- Disable the default Wordpress wp_mail() sending the emails
- Call the Web API with the necessary information such as email address, reset key and user login.
What would be the best way of doing so?