0

这是我的 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
4

1 回答 1

0

刚刚自己测试过。为什么你认为这是不正确的?

来自 PHP 文档:

bool mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )

编辑

好吧,在阅读了您的编辑后,我按下了 Gmail 中的回复按钮。

对我来说看起来还可以。抱歉,我帮不上忙。

于 2011-08-21T19:08:53.780 回答