php mail return false when i run mail function
here is my code
$to = 'xxxxxx@gmail.com';
$subject = 'Login';
$message = 'Thanks for Login ! Your account has been logged on website.';
$headers = 'From:xxxxx@gmail.com' . "\r\n";
var_dump(mail($to, $subject, $message, $headers));
when i opened mail log there is no error found and when i test to send mail over ubuntu terminal using this command
echo "Test mail from postfix" | mail -s "Test Postfix" you@example.com
it sends to me mail correctly
also i configured php.ini
sendmail_path = /usr/sbin/sendmail -t -i -f care@mydomain.com