私のページにフォームがあります。ユーザーが [送信] ボタンをクリックすると、フォームに入力した詳細が記載されたメールが送信されるはずです。最近まで、フォームは Linux サーバーでホストされていましたが、問題はありませんでした。メールは送受信されていました。最近、共有 Windows サーバーに移動する必要がありましたが、移動してからメールが送信されません。メールを送信するコードは次のとおりです。
function send_contact_form($strName, $strEmail, $strPhone, $strMessage)
{
$to = 'mymail@mysite.com';
$subject = 'From the site';
$message = '<html lang="HE">
<head>
<title>
'.$subject.'
</title>
</head>
<body style="text-align:right; direction:rtl; font-family: Arial;">
Name: '.$strName.'<br>Email: '
.$strEmail.'<br>Phone: '.$strPhone
.'<br><br>Message: <br>'.$strMessage.'
</body>
</html>';
$email = $strEmail;
$header = 'MIME-Version: 1.0' . "\r\n";
$header .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
$header .= "From: $email\r\nReply-To: $email" . "\r\n";
mail($to, $subject, $message, $header);
}