我知道我在这里做了一些愚蠢的事情,但我无法弄清楚。我使用以下发送邮件:PHP sendmail地址显示不正确
$headers = "MIME-Version: 1.0
From: ".$from_email."
Bcc: ".$bcc_email."
";
mail($email, $message['subject'], $message['content'], $headers);
其中$from_email = '[email protected]'
消息从地址来通过与错。下面的完整标题:
Return-path: <[email protected]>
Envelope-to: [email protected]
Delivery-date: Tue, 20 Nov 2012 11:01:34 -0500
Received: from cli by [email protected] with local (Exim 4.69)
(envelope-from <[email protected]>)
id 1TaqGI-000232-IJ
for [email protected]; Tue, 20 Nov 2012 11:01:26 -0500
To: [email protected]
Subject: Fairway Solutions - Your new password
MIME-Version: 1.0
From: [email protected]
Bcc: [email protected]
Message-Id: <[email protected]>
From: [email protected]
Date: Tue, 20 Nov 2012 11:01:22 -0500
烦人,我可以看到从通过正确的到来,但它就像收到与主机的信息覆盖。我在服务器级别丢失了什么?
我也尝试在php.ini文件(ini_set(sendmail_from,[email protected]);
)中设置它,它没有区别。
TA
相关:http://stackoverflow.com/questions/179014/how-to-change-envelope-从地址使用PHP的邮件http://stackoverflow.com/questions/2229435/how-do-i-set-the-from-address-in-a-php-contact-form – twodayslate
我通常使用PHPMailer来从PHP脚本发送电子邮件,使用^^ – Naryl