Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SpoddyCoder opened this issue Nov 2, 2020 · 0 comments
Open

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

SpoddyCoder opened this issue Nov 2, 2020 · 0 comments

Comments

@SpoddyCoder
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant