我在使用 PHP 发送邮件时遇到问题。Outlook 可以正确接收邮件,但在电子邮件中未显示“发件人”地址。
$subject = $_POST['message_subject'];
$message = $_POST['speaker_description'];
$email = $_POST['email'];
$option = $_POST['sel_reg_options'];
$email = substr_replace($email ,"",-1);
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From:My Name<myifno@mysite.com>\r\n";
$headers .= "Reply-To: Registration of Interest<info@mysite.com>\r\n";
$headers .= "MIME-Version: 1.0"."\r\n";
$mail_sent = @mail($email,$subject,$message,$headers);