收到多个邮件:发件人:在 Gmail 的原始邮件中

Multiple Received: from in Original Message in Gmail

提问人:Manisha 提问时间:7/21/2023 更新时间:7/28/2023 访问量:102

问:

我正在尝试使用 PHPMailer 发送电子邮件。它工作正常,但是当我检查时,它在Gmail中显示多个接收来自的信息,该信息暴露了我的服务器信息而不是SMTP服务器。

Delivered-To: [email protected]
Received: by 2002:a05:6a20:289f:b0:134:8df0:38f2 with SMTP id q31csp2499936pzf;
        Thu, 20 Jul 2023 21:07:59 -0700 (PDT)
X-Google-Smtp-Source: APBJJlGUdtfqZSKhrqY5gy30KUrovK+JgSQfyS1KcTm3lLSvehmvEI+MrNARPjPFzDuDpfyfmebP
X-Received: by 2002:a05:6870:3282:b0:1b0:2d25:f5ae with SMTP id q2-20020a056870328200b001b02d25f5aemr898724oac.47.1689912479685;
        Thu, 20 Jul 2023 21:07:59 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1689912479; cv=none;
        d=google.com; s=arc-20160816;
        b=raNw8UyJ273/lmRHrYlSSOP/4tjrWEZgOK2NGlqkYhQfGkhv/LQfDQJr0fbsOD6Q4u
         IQUMZhJLVmCSXI6NkhLnJtNTs6l/w4NsIA3gRqdbMm725WRugwItWThCO/hVZBELVmHT
         bL67mPDppKSGOn6ynGrx7HCjwDpyPyubg2dCv65Z8u/jjXqXGmz26FFK4Q3NEWWKMLmQ
         64J/LotDOWkWzZ7LVpSpmg9KsnY1LZqtMeutfZZAoO4DU8akfW9OwQtGb9LdexzlJks2
         Gel4UIfrPkaFGAJx4cEtlaY54KYTkk1Ui6adsMCjcUp1hDgz3ZstjSp6cDPsLaUv+zTO
         bCDw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=mime-version:message-id:subject:from:to:date:dkim-signature;
        bh=bIDjwW/gXuMp99hIYSKpyBdpvCx8uFr77qlql7C/iAo=;
        fh=38P0F8Oks2zx3dfUfXd63HKtV+2/22/mUQuXfmmtf+4=;
        b=H3jfjyV018ufJ1PpmlRMLMuVVRHWMwbzy8goD3Xbo2rhaZQ8yzAo5S9vXL3cgO639Z
         C2/q5GoWIerlzGNWVUySbwuBhYJ9ZuZiaEG14aDZvc9V03JthfwS3sYaBXoFIdgCLZDV
         KH8V1iWQMMmX232X/pJZSMKPHo4qeYmkNkLNNXGnCBA1Ncc75+fY37djD+pL64PPrtN+
         Sv51ES40zJTtiLH3w/M5xcyrTKm/Rhur2W220bNFXaMs6l/mzp64gnXL/v+y47OZX9Gw
         hp7zM7AyBa2/HFVmE/LpzqvGzFxx36HpeXV3kheFBJxp/WOunLyUHC5lRXcwTqRswl6o
         kzIw==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass [email protected] header.s=mail header.b=dHe3YPZJ;
       spf=pass (google.com: domain of [email protected] designates 02.02.02.02 as permitted sender) [email protected];
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=examplesmtp.com
Return-Path: <[email protected]>
Received: from server.examplesmtp.com (server.examplesmtp.com. [02.02.02.02])
        by mx.google.com with ESMTPS id z10-20020a05687041ca00b001baa7691f53si1163446oac.314.2023.07.20.21.07.59
        for <[email protected]>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Thu, 20 Jul 2023 21:07:59 -0700 (PDT)
Received-SPF: pass (google.com: domain of [email protected] designates 02.02.02.02 as permitted sender) client-ip=02.02.02.02;
Authentication-Results: mx.google.com;
       dkim=pass [email protected] header.s=mail header.b=dHe3YPZJ;
       spf=pass (google.com: domain of [email protected] designates 02.02.02.02 as permitted sender) [email protected];
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=examplesmtp.com
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=examplesmtp.com; s=mail; h=Content-Type:MIME-Version:Message-ID:Subject: From:To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=bIDjwW/gXuMp99hIYSKpyBdpvCx8uFr77qlql7C/iAo=; b=dHe3YPZJi1MdY5hFwOwcwbaPtv TH17w7bJm2uqc188DLBrZX6e59UIXGCOX4F2rc7idgInsH1LjaZ3fmntx3dmQfTZySobf5CyLjim6 xYtUkdq2U9SZy7HBW8U+IGbC3ethu+koRnxb2rspyQ6/2vkqv6AB8Q+A/OpL1KpHEEGk=;
Received: from my.server.com ([01.01.01.01] helo=server.examplesmtp.com) by server.examplesmtp.com with esmtpsa
  (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <[email protected]>) id 1qMhQt-005Xhj-Bj for [email protected]; Fri, 21 Jul 2023 04:07:59 +0000
Date: Fri, 21 Jul 2023 04:07:58 +0000
To: [email protected]
From: Darnell Collins <[email protected]>
Subject: Update on Your Ticket: ID {{ random_number }}
Message-ID: <QiIFKmlxcLpJXTocKXTuPXif2UxTtLsMhwTCk4ELURQ@server.examplesmtp.com>
X-Originating-IP: server.examplesmtp.com
MIME-Version: 1.0
Content-Type: text/html; charset=iso-8859-1

I hope this email finds you well. I wanted to inform you that we have made some recent updates to your ticket, ID {{ random_number }}, and would greatly appreciate it if you could take a moment to review and acknowledge the changes.

If you have any questions or require further assistance, please don't hesitate to reply to this email. We are here to help.

Thank you for your attention to this matter.

Best Regards,

我的代码是这样的

$mail = new PHPMailer(true);

    try {

        $mail->SMTPDebug = 4;
        $mail->isSMTP();
        $mail->Host       = $s_server;
        $mail->SMTPAuth   = true;
        $mail->Username   = $s_username;
        $mail->Password   = $s_password;
        $mail->SMTPSecure = $s_protocol;
        $mail->Port       = $s_port;
        $mail->Hostname = $s_server;
        $mail->XMailer = ' ';
        $mail->addCustomHeader('X-Originating-IP: '.$s_server);
        
        $mail->SMTPOptions = array(
       'ssl' => array(
                'verify_peer' => false,
                'verify_peer_name' => false,
                'allow_self_signed' => true
            )
        ); 
    
        //Recipients
        $mail->setFrom($s_from, $s_from_name);
        $mail->addAddress($email);
        
        $mail->isHTML(true);
        $mail->Subject = $subject;
        $mail->Body    = $template;

        $mail->send();
    } 
    catch (Exception $e) {
        
    }

enter image description here

我认为它多次签约。我已经在 github 上发布了问题,但没有运气。我不知道如何预防它。如果这里有人可以帮助我,请告诉我。

谢谢!

PHP 电子邮件 phpmailer

评论

2赞 CBroe 7/21/2023
这与 PHPMailer 没有任何关系。 邮件本身并没有凭空生成 - 它 .如果您不喜欢将此信息添加到邮件中 - 那么您必须为自己找到一个将此信息添加到邮件头的SMTP服务器。server.examplesmtp.commy.server.com

答:

0赞 OleksandrMatisko 7/22/2023 #1

您似乎正在使用 PHPMailer 通过 Gmail SMTP 服务器发送电子邮件。

一种解决方案是在电子邮件标题中添加一个字段。 另一种解决方案是使用(密复印)而不是在将多个收件人添加到您的电子邮件时。Reply-ToBCCTo

Oleksandr 在自由职业者网站。

评论

0赞 fiction 7/28/2023
你的回答不是关于主题启动器的问题