2017-07-03 77 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

將代碼重新格式化並明確指定應填充哪些部分是很好的做法。 –

相關問題