title: How to get extra error information from PHP's mail() failure?
body: <p>When <a href="http://us3.php.net/manual/en/function.mail.php" rel="noreferrer">mail</a>() 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 <strong>pragmatic</strong>, 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, <strong>actionable</strong> error?</p>