【问题标题】:Configuring exim's outgoing e-mail address配置 exim 的外发电子邮件地址
【发布时间】:2012-08-25 02:39:58
【问题描述】:

我忘了我是怎么设置的。我有两个网站,我通过第二个网站发送电子邮件。这是我的/etc/exim4/passwd.client 文件:

*.google.com:noreplyn@firstsite.com:password
*.google.com:noreply@secondsite.com:password

我正在通过 PHP 的 mail() 函数发送邮件,其中包含以下标题:

$headers = 'From: no-reply <noreply@secondsite.com>' . "\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Reply-To: noreply@secondsite.com' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";

但我在客户的电子邮件中收到了这个标题:

from:    no-reply firstsite.com
reply-to:    secondsite.com
to:  apathetic012@gmail.com

如何正确设置 exim 的自定义外发电子邮件地址?

PS:我正在使用智能主机(Google 应用)

【问题讨论】:

    标签: php email debian exim4


    【解决方案1】:

    设置您的信封From

    mail($recipient, $subject, $body, $headers, '-f noreply@secondsite.com');
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-04-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多