开发者

php mail on gmail - am I crazy or what?

This is my php function :

$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);

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

From : sender@hosting.com
To : destination@gmail.com

: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 sender@hosting.com trougth webxc13s09.ad.aruba.it 
reply to    sender@hosting.com
to 开发者_开发知识库 destination@gmail.com

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

from : sender@hosting.com
to : destination@gmail.com

but is wrong. Should be

from : destination@gmail.com
to : sender@hosting.com


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜