开发者

Mail sent "on behalf of" when using PHP Pear

I am using PEAR to send mails from our server. However, some email clients (most importantly Gmail) will say "Mail received from nobody@server on behalf of John Doe". What causes this? Is this PHP or the server config itself?

With the headers I set:

$headers["From"] = John Doe<johndoe@example.com>;
$headers["Return-path"] = John Doe<johndoe@example.com>;
$headers["Sender"] = John Doe<johndoe@example.com>;

However, when I look into the e-mail headers of the actual mail that is arrived, I see:

开发者_运维问答Return-path: <nobody@server>
Received: from nobody by server with local (Exim 4.69)
  (envelope-from <nobody@server>)
  id 1Thn0Y-0001yy; Tue, 25 Jan 2011 11:48:46 -0600
From: John Doe<johndoe@example.com>
Sender: Nobody <nobody@server>
Date: Tue, 25 Jan 2011 11:48:46 -0600

So except for the FROM field, all other header settings are ignored...! What to do?


What you are seeing is that the envelope headers are being generated by Exim. You will need to change the configuration, or send differently to get around this. With normal sendmail, there are a few simple commandline switches you specify, and I would imagine it is the same with Exim.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜