I have read I believe every post on here related to this. I have a feeling that this is Linux file rights related, but not to sure. My environment is a test Centos7 box running Apache 2.4 and Php7 with phpMyAdmin etc. I can send mail using the sendmail [email protected]. I have tested this.
In my php.ini file(s) I have "sendmail_path = /usr/sbin/sendmail -t -i;"
$to = "[email protected]";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: [email protected]" . "\r\n" .
"CC: [email protected]";
$mail = mail($to,$subject,$txt,$headers); //I have tried with no headers as well.
The mail function returns a false.