If anyone gets this cryptic error message in the PHP error logs:
"sh: -t: command not found"
after upgrading from PHP 5.4, this may be the solution for you.
I upgraded PHP from 5.4 to 5.6 and all our mail() functionality suddenly broke, with no useful error logging.
If this is you, and you've been using ini_set() to set the "sendmail_path" then note that even though it's apparently not mentioned in the upgrade documentation -- or anywhere else I could find on php.net (or a dozen forums) -- you'll now need to go set the sendmail_path in your php.ini file; it is now ignored if you use ini_set() to specify a path to the sendmail binary on the fly.
So, just specify "sendmail_path" in php.ini instead. That's all there is to it -- that fixed all the mail() functionality for us.
Hope this little note saves someone else as much time as I spent troubleshooting and researching. Cheers!