php 接收多个:来自Gmail中的原始邮件

pgvzfuti  于 2023-08-02  发布在  PHP
关注(0)|答案(1)|浏览(182)

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

Delivered-To: mygmail@gmail.com
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 header.i=@examplesmtp.com header.s=mail header.b=dHe3YPZJ;
       spf=pass (google.com: domain of darnell@examplesmtp.com designates 02.02.02.02 as permitted sender) smtp.mailfrom=darnell@examplesmtp.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=examplesmtp.com
Return-Path: <darnell@examplesmtp.com>
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 <mygmail@gmail.com>
        (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 darnell@examplesmtp.com designates 02.02.02.02 as permitted sender) client-ip=02.02.02.02;
Authentication-Results: mx.google.com;
       dkim=pass header.i=@examplesmtp.com header.s=mail header.b=dHe3YPZJ;
       spf=pass (google.com: domain of darnell@examplesmtp.com designates 02.02.02.02 as permitted sender) smtp.mailfrom=darnell@examplesmtp.com;
       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 <darnell@examplesmtp.com>) id 1qMhQt-005Xhj-Bj for mygmail@gmail.com; Fri, 21 Jul 2023 04:07:59 +0000
Date: Fri, 21 Jul 2023 04:07:58 +0000
To: mygmail@gmail.com
From: Darnell Collins <darnell@examplesmtp.com>
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) {
        
    }


的数据
我认为它的签署多次。我在github上发布了问题,但没有运气。我不知道如何防止它。告诉我这里是否有人能帮我。
谢谢你,谢谢

rggaifut

rggaifut1#

您似乎正在使用PHPMailer使用Gmail SMTP服务器发送电子邮件。
一个解决方案是在电子邮件标题中添加Reply-To字段。另一个解决方案是在向电子邮件添加多个收件人时使用BCC(盲抄送)而不是To
Oleksandr在自由职业者网站.

相关问题