trying to reply to an existing email with gmail API

↘锁芯ラ 提交于 2019-12-11 07:04:08

问题


I'm trying to reply to an existing email with Gmail API:

Since I don't have in the existing mail that i want to reply to the headers of References, In-Reply-To then i'm using the Message-ID instead to fill what I'm sending

DB5PR03MB1206D3A24F124BDF43A5C6E683D60@DB5PR03MB1206.eurprd03.prod.outlook.com is the Message-ID header of existing mail.

I've created the following RFC-802:

Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
References: <DB5PR03MB1206D3A24F124BDF43A5C6E683D60@DB5PR03MB1206.eurprd03.prod.outlook.com>
In-Reply-To: <DB5PR03MB1206D3A24F124BDF43A5C6E683D60@DB5PR03MB1206.eurprd03.prod.outlook.com>
Subject: sdfasdf
to: "xxx@gmail.com" <aaa@gmail.com>,<xxxx@xxx.me>
from: aaa@gmail.com
aaaaaaaaa

then i get an error:

that an error occured the message wasn't sent.

I read this post but this post presumes that always i have the following two headers:

  1. References
  2. In-Reply-To

回答1:


Remove References and set In-Reply-To : Message-ID

Content-Type: text/plain; charset="UTF-8" <br />
MIME-Version: 1.0<br />
Content-Transfer-Encoding: 7bit<br />
In-Reply-To: Message-ID<br />
Subject: sdfasdf<br />
to: "xxx@gmail.com" <aaa@gmail.com>,<xxxx@xxx.me><br />
from: aaa@gmail.com<br />
aaaaaaaaa


来源:https://stackoverflow.com/questions/44880439/trying-to-reply-to-an-existing-email-with-gmail-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!