1

mail()我的 php 表单中的函数存在这个问题。它工作正常,但是当我在主题中添加“2013”​​时,电子邮件没有送达。

$subject = 'New WX Woman';  // Works
$subject = 'New 1111 WX Woman';  // Works
$subject = 'New 2022 WX Woman';  // Works
$subject = 'New 1022 WX Woman';  // Works
$subject = 'New 2013 WX Woman';  // Dont Work!!!

if (mail($to, $subject, $message, $headers)) {...

知道什么可能导致我的问题吗?

更新 [带标题的代码]

$to = 'email@email.com';
$subject = 'New 2022 WX Woman';
$headers = 'From: WX Woman of the Year <info@gmail.com>' . "\r\n";
$headers .= "Reply-To: ". strip_tags($_POST['req-email']) . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

$message .= '</body></html>';

if (mail($to, $subject, $message, $headers)) {
echo("success");
} else {
echo("fail");
}
4

0 回答 0