Phpmailer修改邮件头



我有一个托管在Lamp服务器上的网站,有一个联系表单将使用phpmailer从smtp (gmail)发送电子邮件,

在phpmailer脚本中添加自定义主机名

  public $Hostname          = 'www.google.com';
  /**
   * Sets the message ID to be used in the Message-Id header.
   * If empty, a unique id will be generated.
   * @var string
   */

当我查看邮件的来源时在标题

中有一行
Received: from www.google.com (234092384281.ctinets.com. [server.ip.ip.ip])
        by mx.google.com with ESMTPSA id ve6sm3340494pbc.21.2013.05.29.21.17.15
        for <mygmailacc@gmail.com>
        (version=TLSv1 cipher=RC4-SHA bits=128/128);
        Wed, 29 May 2013 21:17:16 -0700 (PDT)

是否可以删除(234092384281.ctinets.com。[server.ip.ip.ip]) ?

不,这是不可能的,当你使用谷歌SMTP,他们控制它。不是你。如果你想摆脱它你就必须使用自己的SMTP服务器

最新更新