この単純なphpメールスクリプトを取得してメールアドレス(mike_minerva@yahoo.com)にメールを送信しようとしていますが、機能しません。php.iniのsendmail_pathを正しいフォルダー(/ etc / sbin / sendmail)に設定しましたが、それは役に立たなかったようです。他に何が欠けている可能性がありますか?スクリプトは常に失敗を返します。
<?php
$to = "mike_minerva@yahoo.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@example.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
if(mail($to,$subject,$message,$headers))
echo "Mail Sent.";
else
echo "failure";
?>