gmail 上的 php 邮件 - 我疯了还是什么?

发布于 2024-11-30 11:02:48 字数 2307 浏览 3 评论 0原文

这是我的 php 函数:

$message="Hello";
$headers='From: "Sender" <[email protected]>'."\r\n".'Reply-To: [email protected]'."\r\n".'X-Mailer: PHP/'.phpversion();
mail("[email protected]", "Title", $message, $headers);

我在 gmail 上收到邮件,但是当我单击“回复”时,我在字段中看到:

From : [email protected]
To : [email protected]

:O 应该是相反的。为什么这么麻烦?

编辑

这是我收到gmail邮件时的标题:

from    My Hosting [email protected] trougth webxc13s09.ad.aruba.it 
reply to    [email protected]
to  [email protected]

这是正确的!当我打开该邮件并单击“回复”时,Gmail 发件人/收件人字段将填充为:,

from : [email protected]
to : [email protected]

但这是错误的。应该是

from : [email protected]
to : [email protected]

This is my php function :

$message="Hello";
$headers='From: "Sender" <[email protected]>'."\r\n".'Reply-To: [email protected]'."\r\n".'X-Mailer: PHP/'.phpversion();
mail("[email protected]", "Title", $message, $headers);

I get the mail on gmail, but when I click on Reply I see in the fields :

From : [email protected]
To : [email protected]

:O It should be the opposite. Why this trouble?

EDIT

This is the header of the gmail's mail when I get it :

from    My Hosting [email protected] trougth webxc13s09.ad.aruba.it 
reply to    [email protected]
to  [email protected]

and That's correct! When I open that mail and I click on Reply, the Gmail Fields From/To are populated as :

from : [email protected]
to : [email protected]

but is wrong. Should be

from : [email protected]
to : [email protected]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

好听的两个字的网名 2024-12-07 11:02:48

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

来自 PHP 文档:

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

编辑

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

对我来说仍然看起来不错。抱歉我帮不上忙。

Just tested that myself. Why do you think that's incorrect?

From PHP doc:

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

EDIT

Well after reading your Edit I pressed the reply button in Gmail.

This still looks OK to me. Sorry that I couldn't help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文