使用Gmail Api对电子邮件进行线程处理[新的线程处理要求之后] [英] Threading Email Messages with Gmail Api [After New Threading Requirements]

查看:93
本文介绍了使用Gmail Api对电子邮件进行线程处理[新的线程处理要求之后]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用raw(基于base64编码)&创建消息对象. threadID字段值.通过使用(现有电子邮件的)有效的threadId,我能够在用户收件箱中创建线程化消息.

I am creating Message Object with raw(base64 encoded) & threadID field values. By using a valid threadId (of an existing email) , i was able to create a Threaded Message in users inbox.

Google在2019年4月更改了线程更改"后,邮件不再进行线程处理.而是将它们显示为单独的消息,尽管两个消息的ThreadID相同.

Google建议添加参考"&来自现有电子邮件的"In-Reply-To"标头,其值为"Message-Id".问题是,每当我们使用gmail api发送新电子邮件时,我们只会收到回切的消息,其中仅包含ThreadID和Label值.要检索此已发送电子邮件的"Message-Id",需要进行另一个GET API调用.这会给系统增加额外的负担,并不必要地使系统变得复杂.

Google has recommended to add 'References' & 'In-Reply-To' header with value of 'Message-Id' from existing email. The Problem is, whenever we sent a new email using gmail api, we only receive message snipped back which only has ThreadID and Label values. To Retrieve 'Message-Id' of this sent email, another GET API call needs to be made. This is adding extra load to the system and un-necessarily making the system complex.

我的问题:

  1. 是否还有其他方法可以使用Gmail-APi主题消息?

我们可以在不进行另一个API调用的情况下检索Message-ID吗?

我们是否可以使用任何其他标头/自定义标头在消息之间建立关系以供它们穿线.

推荐答案

使用Gmail API发送电子邮件时,响应中包含消息ID,您可以通过

When you send an email with Gmail API, the response contains the message id, as you can confirm with the Users.messages: send Try this API, so another API call is not necessary.

这篇关于使用Gmail Api对电子邮件进行线程处理[新的线程处理要求之后]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆