Gmail API - 邮件未串入 :Sent
Gmail API - messages not threaded in :Sent
我正在通过 API 发送回复电子邮件 - 这是对我自己邮件的回复。我在主题前添加 'Re: ',添加参考文献:和 In-Reply-To:headers,以及 parent.
的 Message-Id:
邮件在接收箱中正确串接,但在我的发件箱中,电子邮件被创建为一个单独的实体 - 如果我使用网络界面或桌面应用程序,则不会发生这种情况。
原始消息示例:
通过网络界面创建的原始消息(我删除了地址):
MIME-Version: 1.0
Received: by 10.37.207.3 with HTTP; Thu, 10 Dec 2015 07:39:53 -0800 (PST)
Date: Thu, 10 Dec 2015 16:39:53 +0100
Delivered-To:
Message-ID: <CAPf8QCoRSL9N18ss1hFWF+CW0Rx15typqxhJnHLHgimJ+Hv=zQ@mail.gmail.com>
Subject: wat
From:
To:
Content-Type: multipart/alternative;
通过 API 创建的响应:
Received: from 512896642660-8e1jj3ccsnam3mm1k91qn7c0k6odc316.apps.googleusercontent.com
named unknown
by gmailapi.google.com
with HTTPREST;
Thu, 10 Dec 2015 07:40:25 -0800
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
To:
From:
Subject: Re: wat
In-Reply-To: <CAPf8QCoRSL9N18ss1hFWF+CW0Rx15typqxhJnHLHgimJ+Hv=zQ@mail.gmail.com>
References: <CAPf8QCoRSL9N18ss1hFWF+CW0Rx15typqxhJnHLHgimJ+Hv=zQ@mail.gmail.com>
Date: Thu, 10 Dec 2015 07:40:25 -0800
Message-Id: <CAPf8QCq0Fh-LoC77cJ84gxERUZZMgXTuWMwG9-ZeO3LEybbkBQ@mail.gmail.com>
Here's how these messages look in my outbox
,任何想法出了什么问题以及为什么消息没有线程化?
根据 GMail API 开发者网站中的 Managing Threads,有 3 个条件被视为线程
In order to be part of a thread, a message or draft must meet the following criteria:
- The requested threadId must be specified on the Message or Draft.Message you supply with your request.
- The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.
- The Subject headers must match.
由于您在开头附加了 "RE:",它似乎被视为一个单独的主题,并没有作为主题的一部分包含在内。
希望对您有所帮助!
我正在通过 API 发送回复电子邮件 - 这是对我自己邮件的回复。我在主题前添加 'Re: ',添加参考文献:和 In-Reply-To:headers,以及 parent.
的 Message-Id:邮件在接收箱中正确串接,但在我的发件箱中,电子邮件被创建为一个单独的实体 - 如果我使用网络界面或桌面应用程序,则不会发生这种情况。
原始消息示例:
通过网络界面创建的原始消息(我删除了地址):
MIME-Version: 1.0
Received: by 10.37.207.3 with HTTP; Thu, 10 Dec 2015 07:39:53 -0800 (PST)
Date: Thu, 10 Dec 2015 16:39:53 +0100
Delivered-To:
Message-ID: <CAPf8QCoRSL9N18ss1hFWF+CW0Rx15typqxhJnHLHgimJ+Hv=zQ@mail.gmail.com>
Subject: wat
From:
To:
Content-Type: multipart/alternative;
通过 API 创建的响应:
Received: from 512896642660-8e1jj3ccsnam3mm1k91qn7c0k6odc316.apps.googleusercontent.com
named unknown
by gmailapi.google.com
with HTTPREST;
Thu, 10 Dec 2015 07:40:25 -0800
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
To:
From:
Subject: Re: wat
In-Reply-To: <CAPf8QCoRSL9N18ss1hFWF+CW0Rx15typqxhJnHLHgimJ+Hv=zQ@mail.gmail.com>
References: <CAPf8QCoRSL9N18ss1hFWF+CW0Rx15typqxhJnHLHgimJ+Hv=zQ@mail.gmail.com>
Date: Thu, 10 Dec 2015 07:40:25 -0800
Message-Id: <CAPf8QCq0Fh-LoC77cJ84gxERUZZMgXTuWMwG9-ZeO3LEybbkBQ@mail.gmail.com>
Here's how these messages look in my outbox ,任何想法出了什么问题以及为什么消息没有线程化?
根据 GMail API 开发者网站中的 Managing Threads,有 3 个条件被视为线程
In order to be part of a thread, a message or draft must meet the following criteria:
- The requested threadId must be specified on the Message or Draft.Message you supply with your request.
- The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.
- The Subject headers must match.
由于您在开头附加了 "RE:",它似乎被视为一个单独的主题,并没有作为主题的一部分包含在内。
希望对您有所帮助!