2017-07-03 37 views
1

我试图回复使用Gmail API的现有电子邮件:尝试使用Gmail API回复现有电子邮件

由于我没有在现有邮件中回复标题参考,在-回复至然后我使用的消息ID,而不是填补了我要送

[email protected]od.outlook.com是现有的邮件的Message-ID头。

我创建了以下RFC-802:

Content-Type: text/plain; charset="UTF-8" 
MIME-Version: 1.0 
Content-Transfer-Encoding: 7bit 
References: <[email protected]od.outlook.com> 
In-Reply-To: <[email protected]od.outlook.com> 
Subject: sdfasdf 
to: "[email protected]" <[email protected]>,<[email protected]> 
from: [email protected] 
aaaaaaaaa 

然后我得到一个错误:

that an error occured the message wasn't sent.

我读这post但这篇文章假定总是我有以下两个头:

  1. 参考
  2. 在-Reply-为了
+0

你见过这个[SO后(https://stackoverflow.com/questions/32589476/how-to-send-a-reply-with -gmail-API)?它的实现是在JS中,但它可能会给你一些想法。 – noogui

回答

0

删除引用,并设置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: "[email protected]" <[email protected]>,<[email protected]><br /> 
from: [email protected]<br /> 
aaaaaaaaa 
+0

将代码重新格式化并明确指定应填充哪些部分是很好的做法。 –

相关问题