gpt4 book ai didi

email - In-Reply-to 和 Reference 已添加到电子邮件标题中,但仍作为新邮件发送但不回复

转载 作者:行者123 更新时间:2023-12-02 04:37:23 25 4
gpt4 key购买 nike

我正在尝试通过 PHPmailer “回复”电子邮件,但不是“发送新电子邮件”,但即使将 In-Reply-to 和 Reference 添加到电子邮件标题中,我也失败了,这意味着它表明它仍然是一封新电子邮件,原始电子邮件从未被回复。感谢帮助。

我的代码:

  if($this->MessageID != '') {
$result .= $this->HeaderLine('Message-ID',$this->MessageID);
} else {
$result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE);
}

if($this->References != ''){
$result .= $this->HeaderLine('References',$this->References);
}

if($this->InReplyTo != ''){
$result .= $this->HeaderLine('In-Reply-To',$this->InReplyTo);
}

$result .= $this->HeaderLine('X-Priority', $this->Priority);
$result .= $this->HeaderLine('X-Mailer', 'PHPMailer '.$this->Version.' (phpmailer.sourceforge.net)');

通过 phpmailer 发送的电子邮件标题(我失败了,这意味着仍然是一封新电子邮件但没有回复)
Date: Sat, 3 Dec 2016 17:01:21 +0800
To: Eric <erichu@test.com>
From: support <support@test.com>
Subject: Re:testemail12031604
Message-ID: <tencent_0634F549045841EE1B94753E@test.com>
References: <tencent_205C6E0F42D57AD16CFF6B9C@test.com>
In-Reply-To: <tencent_205C6E0F42D57AD16CFF6B9C@test.com>
X-Priority: 3
X-Mailer: PHPMailer 5.1 (phpmailer.sourceforge.net)
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="b1_39519ee60f388e1a9b9a9ec312ae2071"

这是成功回复电子邮件的标题,在网络上回复
From: "=?utf-8?B?RWxhaW5l?=" <support@test.com>
To: "=?utf-8?B?RXJpYw==?=" <erichu@test.com>
Subject: Re:hubreplytestemail12031604
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_5842871D_0A6F1F10_2B4284B6"
Content-Transfer-Encoding: 8Bit
Date: Sat, 3 Dec 2016 16:49:33 +0800
X-Priority: 3
Message-ID: <tencent_477F7F80668628EB4A87C531@test.com>
X-QQ-MIME: TCMime 1.0 by Tencent
X-Mailer: QQMail 2.x
X-QQ-Mailer: QQMail 2.x
References: <tencent_205C6E0F42D57AD16CFF6B9C@test.com>
In-Reply-To: <tencent_205C6E0F42D57AD16CFF6B9C@test.com>
X-QQ-ReplyHash: 2325734638

最佳答案

看起来您使用的是非常旧的 PHPMailer 版本;它已经多年没有在 sourceforge 上维护,5.1.0 于 2010 年发布! Get the latest .你为什么还要看 PHPMailer 的内部?你应该调用addCustomHeader()添加您想要的标题:

$mail->addCustomHeader('References', '<tencent_205C6E0F42D57AD16CFF6B9C@test.com>');
$mail->addCustomHeader('In-Reply-To', '<tencent_205C6E0F42D57AD16CFF6B9C@test.com>');

关于email - In-Reply-to 和 Reference 已添加到电子邮件标题中,但仍作为新邮件发送但不回复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40998463/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com