deliciousbrains / wp-offload-ses-lite

WP Offload SES Lite sends all outgoing WordPress emails through Amazon Simple Email Service (SES) instead of the local wp_mail() function.
https://wordpress.org/plugins/wp-ses/
13 stars 11 forks source link

wp_mail() always responds 1 - even if it fails #20

Open SpoddyCoder opened 3 years ago

SpoddyCoder commented 3 years ago

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.