PHP mail() を使用して単純な HTML メールを送信しようとしています。
次のコードは正常に動作します
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
If(mail('xyz@gmail.com', 'test mail', 'test<hr>this is a test mail', $headers)){
Echo 'OK';
} else{
Echo 'Not ok';
}
問題: 本文に特定の URL を入力するとすぐに、コードは問題ないと表示されますが、電子メールは受信されません。
If(mail('xyz@gmail.com', 'test mail', 'test<hr>this is a test mail from www.xyz.com', $headers)){
Echo 'OK';
} else{
Echo 'Not ok';
}
誰かが問題とその修正方法を教えてくれますか?