<! - ?php mail()不起作用

时间:2017-12-08 13:21:06

标签: php parsing

<预 - > <?php if (isset($_POST["submit"])){ $to = 'somebody@once.told.me'; $subject = 'the world was gonna roll me'; $user = $_POST['user']; $comment = $_POST['comment']; $tel = $_POST['tel']; $email = $_POST['mail']; $message = "From " . $user . "\r\n" . "Im not the sharpest tool in the shed" . "\r\n" . "Addidtional details " . "\r\n" . $email . "\r\n" . $tel;} if ($_POST){ mail($to, $subject ,$message); $feedback = 'she was looking kind of dumb'; } ?>
  

现在它更具可读性,在切换休息并应用我需要的所有内容之后,它就像以前一样停止发送到电子邮件。它发送反馈,没有别的。
  你知道为什么吗?

1 个答案:

答案 0 :(得分:1)

如果您想通过HTML邮件发送,请尝试使用

$message = "form:" . $user . "\r\n<br>" .
$comment . "\r\n<br>" 
         . "additional contact:" . $email . $tel;