我知道我在這裏做了一些愚蠢的事情,但我無法弄清楚。我使用以下發送郵件: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