If I leave my default sendmail options set in php.ini it works fine and sends an email. However if I change the sendmail path to:
sendmail_path = "sendmail -t -i -x /var/log/mail.log"
mail() returns false.
If I run:
ls -l /var/mail/mail.log
I get:
-rwxrw-rw- 1 www-data www-data 0 Sep 17 14:49 /var/mail/mail.log
Which I believe is correct. All I want sendmail to do is log my emails but for some reason it really really doesn't want to play ball!
Just for clarity - this isn't the mail.log parameter which logs the PHP interactions with the script. The output when this is set is something like this:
[17-Sep-2016 15:38:20 Europe/London] mail() on [/home/server/www/dev1/htdocs/mail.php:15]: To: TO -- Headers: MIME-Version: 1.0 From: ME