更改发件人名称 php 邮件而不是 sitename@hostname.com
2022-08-30 15:06:40
我正在尝试从我的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