大约 30% 的访问者填写表单并且无法隔离问题时,我会收到“此消息没有内容”错误。下面是用于发送电子邮件的 php,地址是匿名的。有任何想法吗?
到目前为止,我试图在论坛中找到答案,但无济于事。谢谢你的帮助!
<?php
$fromAddress = 'x@www.com';
$subject = 'Resources - White Paper Download - '.$_POST['WhitePaper'];
$message .= "\r\n";
foreach($_POST as $name => $value) {
$message .= $name . ': ' . $value . "\r\n";
}
$to = 'y@www.com';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/plain; charset=UTF-8' . "\r\n";
$headers .= 'From: ' . $fromAddress . "\r\n" .
'Reply-To: ' . $fromAddress . "\r\n" .
'X-Mailer: PHP/' . phpversion(). "\r\n";
$headers .= 'Cc: z@www.com, <t@www.com>' . "\r\n";
mail($to, $subject, $message, $headers);
echo "mail sent";
?>