0

I am trying to send two mails from PHPMailer, First mail and second is reply mail, but second mail is always creating the new mail. First mail Message-ID is present in second mail In-Reply-To and References, but second mail is always creating the new mail, I don't know why.

First Mail Header->

Return-Path: PF_IPN@domain.com
Received: from mail13.domain.com (LHLO mail13.domain.com)
 (163.172.44.78) by mail13.domain.com with LMTP; Tue, 17 Sep 2019
 16:11:02 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
    by mail13.domain.com (Postfix) with ESMTP id 52B232A809CD
    for <sumit.sharma@mail13.domain.com>; Tue, 17 Sep 2019 16:11:02 +0200 (CEST)
X-Virus-Scanned: amavisd-new at mail13.domain.com
X-Spam-Flag: NO
X-Spam-Score: -2.603
X-Spam-Level:
X-Spam-Status: No, score=-2.603 required=6.6 tests=[BAYES_00=-1.9,
    HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.723, RP_MATCHES_RCVD=-1.426,
    SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail13.domain.com ([127.0.0.1])
    by localhost (mail13.domain.com [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id pbpvDduZvioo for <sumit.sharma@mail13.domain.com>;
    Tue, 17 Sep 2019 16:09:44 +0200 (CEST)
Received: from mail11.domain.com (mail11.domain.com [51.15.189.154])
    by mail13.domain.com (Postfix) with ESMTP id 211282A809C5
    for <sumit.sharma@mail13.domain.com>; Tue, 17 Sep 2019 16:09:39 +0200 (CEST)
Received: from smtp.domain.com (smtp.domain.com [37.187.47.173])
    by mail11.domain.com (Postfix) with ESMTP id A02CC4608A7
    for <sumit.sharma@domain.com>; Wed, 31 Jan 2018 07:37:29 +0100 (CET)
Received: from www.newdomain.com (136.ip-51-38-231.eu [51.38.231.136])
    (Authenticated sender: eric.murillo@smtp.domain.com)
    by smtp.domain.com (Postfix) with ESMTPSA id 037AE236A39B
    for <sumit.sharma@domain.com>; Tue, 17 Sep 2019 16:09:36 +0200 (CEST)
Date: Tue, 17 Sep 2019 16:09:35 +0200
To: sumit.sharma@domain.com
From: PF_IPN@domain.com
Subject: First Notification
Message-ID: <1568729375-b96336c79a35fd29eac8e0494b8373dd@ipn.domain.com>
X-Mailer: PHPMailer 6.0.7 (https://github.com/PHPMailer/PHPMailer)
Reply-To: sumit.sharma@domain.com
X-Original-To: sumit.sharma@domain.com
Delivered-To: sumit.sharma@domain.com
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

Second Mail Header ->

Return-Path: PF_IPN@domain.com
Received: from mail13.domain.com (LHLO mail13.domain.com)
 (163.172.44.78) by mail13.domain.com with LMTP; Tue, 17 Sep 2019
 16:11:10 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
    by mail13.domain.com (Postfix) with ESMTP id E81102A809C5
    for <sumit.sharma@mail13.domain.com>; Tue, 17 Sep 2019 16:11:09 +0200 (CEST)
X-Virus-Scanned: amavisd-new at mail13.domain.com
X-Spam-Flag: NO
X-Spam-Score: -0.975
X-Spam-Level:
X-Spam-Status: No, score=-0.975 required=6.6 tests=[BAYES_00=-1.9,
    HTML_IMAGE_ONLY_24=1.618, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.723,
    RP_MATCHES_RCVD=-1.426, SPF_PASS=-0.001, T_REMOTE_IMAGE=0.01]
    autolearn=no autolearn_force=no
Received: from mail13.domain.com ([127.0.0.1])
    by localhost (mail13.domain.com [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id KIORCI_oHPZE for <sumit.sharma@mail13.domain.com>;
    Tue, 17 Sep 2019 16:09:50 +0200 (CEST)
Received: from mail11.domain.com (mail11.domain.com [51.15.189.154])
    by mail13.domain.com (Postfix) with ESMTP id 232072A809C6
    for <sumit.sharma@mail13.domain.com>; Tue, 17 Sep 2019 16:09:39 +0200 (CEST)
Received: from smtp.domain.com (smtp.domain.com [37.187.47.173])
    by mail11.domain.com (Postfix) with ESMTP id 9EB284608B8
    for <sumit.sharma@domain.com>; Wed, 31 Jan 2018 07:37:30 +0100 (CET)
Received: from www.newdomain.com (136.ip-51-38-231.eu [51.38.231.136])
    (Authenticated sender: sender.sender@smtp.domain.com)
    by smtp.domain.com (Postfix) with ESMTPSA id 035F9236A39B
    for <sumit.sharma@domain.com>; Tue, 17 Sep 2019 16:09:37 +0200 (CEST)
Date: Tue, 17 Sep 2019 16:09:36 +0200
To: sumit.sharma@domain.com
From: PF_IPN@domain.com
Subject: Second Notification
Message-ID: <1568729375-b96336c79a35fd29eac8e0494b8373dd.done@ipn.domain.com>
X-Mailer: PHPMailer 6.0.7 (https://github.com/PHPMailer/PHPMailer)
Reply-To: sumit.sharma@domain.com
X-Original-To: sumit.sharma@domain.com
Delivered-To: sumit.sharma@domain.com
References: <1568729375-b96336c79a35fd29eac8e0494b8373dd@ipn.domain.com>
In-Reply-To: <1568729375-b96336c79a35fd29eac8e0494b8373dd@ipn.domain.com>
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
  • [This](https://cr.yp.to/immhf/thread.html) is pretty definitive, and it looks like that's what you're doing - are you seeing this behaviour in all email clients, or just one? Outlook and gmail have pretty poor adherence to RFCs, so it wouldn't surprise me if they don't work. That said, your message-id value is a bit odd - I would expect different messages to have completely different IDs - yours are the same apart from the `.done` suffix. – Synchro Sep 19 '19 at 06:37
  • I see the same behavior in Thundebird and Gmail. I already tried with the different message-id format, but the result is the same. I tried https://gist.github.com/Robbert/4967898 also. – Sumit Sharma Sep 19 '19 at 07:58
  • I recommend comparing replies that do connect with their parent messages with these ones that don't, and see what the differences are. – Synchro Sep 19 '19 at 11:38

0 Answers0