When mail() fails, there not much info about what went wrong. I understand that the best course of action is to check your sendmail logs, or whatever mailer has PHP used. But from a programming and pragmatic, point of view: on a Linux hosted environment, what can a PHP program do to get as much extra info to properly log the failure, probable cause etc and produce an usable, actionable error?
The problem is that, on a Unix-like system, PHP just hands the entire thing to a command-line utility that really only gives PHP the ability to say 'yay' or 'nay'. To do what you want, you'd want to use something like PEAR's Net_SMTP, which can actually communicate intelligently with the mail server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With