我正在尝试从我的 php 发送电子邮件:
$to = 'it@7sisters.in';
$email_from = "info@7sisters.in";
$full_name = 'Suraj Hazarika';
$from_mail = $full_name.'<'.$email_from.'>';
$subject = "testing sender name";
$message = "";
$message .= '
<p><strong>This is only a test . Please do not reply.</strong><br />
';
$from = $from_mail;
$headers = "" .
"Reply-To:" . $from . "\r\n" .
"X-Mailer: PHP/" . phpversion();
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
mail($to,$subject,$message,$headers);
我正在关注PHP 电子邮件表单发件人名称而不是电子邮件的教程?但我仍然收到带有主机名的发件人姓名的电子邮件。
From Date Subject
sisters@rsx02.justhost.com Fri, 11:24 pm testing sender name
sisters@rsx02.justhost.com Fri, 11:24 pm testing sender name