When using wp_mail() function from code, the response always seems to be 1 (success) - even when it fails. Should return 0 if the mail wasn't sent for any reason...
I'd like to pick up and handle mis-configuration in my code. E.g. when the "From" header is incorrectly set to an unverified address - the plugin shows the mail wasn't sent - but my code is unable to handle this failure case.
When using wp_mail() function from code, the response always seems to be 1 (success) - even when it fails. Should return 0 if the mail wasn't sent for any reason...
https://developer.wordpress.org/reference/functions/wp_mail/
I'd like to pick up and handle mis-configuration in my code. E.g. when the "From" header is incorrectly set to an unverified address - the plugin shows the mail wasn't sent - but my code is unable to handle this failure case.