【问题标题】:Gmail telling what I am using to send emailGmail 告诉我使用什么来发送电子邮件
【发布时间】:2020-09-30 12:25:25
【问题描述】:

当我使用 phpmailer 向 gmail 发送电子邮件并查看电子邮件来源时,我会在“发件人”字段旁边看到以下内容:

“使用 PHPMailer 6.1.7 (https://github.com/PHPMailer/PHPMailer)”

出于安全原因,如果可能的话,我更愿意将其删除,但我不知道这是 Gmail 智能还是 phpmailer 将其附加到我发送的每封电子邮件中。

我怎样才能删除它? 谢谢

【问题讨论】:

    标签: php email phpmailer


    【解决方案1】:

    这出现在X-Mailer 标头中。根据the docs,您可以通过将其设置为空格来完全删除此标头,如下所示:

    $mail->XMailer = ' ';
    

    如果它出现在其他地方,我需要查看您的其余代码以及您在 gmail 中收到的邮件的标题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-09-01
      • 1970-01-01
      • 2020-04-26
      • 2018-01-26
      • 2020-07-12
      • 2021-09-11
      • 1970-01-01
      • 2022-06-17
      相关资源
      最近更新 更多