所以,这是我 sendemail.php 中代码的一部分,它运行良好:
$email = $_POST["email"];
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= 'From: <webmaster@example.com'>' . "\r\n";
当尝试编辑 From: 到从我的表单收到的电子邮件时,脚本突然不起作用。你可以帮帮我吗?
我试过这个:
$email = $_POST["email"];
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= 'From: <"$email">' . "\r\n";