这是我的 php 函数:
$message="Hello";
$headers='From: "Sender" <sender@hosting.com>'."\r\n".'Reply-To: sender@hosting.com'."\r\n".'X-Mailer: PHP/'.phpversion();
mail("destination@gmail.com", "Title", $message, $headers);
我在 gmail 上收到邮件,但是当我点击回复时,我在字段中看到:
From : sender@hosting.com
To : destination@gmail.com
:O 应该是相反的。为什么会有这个麻烦?
编辑
这是我收到 gmail 邮件的标题:
from My Hosting sender@hosting.com trougth webxc13s09.ad.aruba.it
reply to sender@hosting.com
to destination@gmail.com
这是正确的!当我打开该邮件并单击回复时,Gmail 字段从/到填充为:
from : sender@hosting.com
to : destination@gmail.com
但这是错误的。应该
from : destination@gmail.com
to : sender@hosting.com