我正在测试新发布的Google 电子邮件迁移 API v2。我还没有找到将电子邮件直接迁移到“所有邮件”文件夹(在 Gmail 中存档)的任何方法。换句话说,不要在邮件上放置任何标签或收件箱。似乎可以通过以下请求来实现:
POST /upload/email/v2/users/admin@jay.powerposters.org/mail?uploadType=multipart HTTP/1.1
Host: www.googleapis.com
Content-length: 402
Content-type: multipart/related; boundary="part_boundary"
Authorization: Bearer <removed>
--part_boundary
Content-Type: application/json; charset=UTF-8
{
'isInbox': 'false'
}
--part_boundary
Content-Type: message/rfc822
Date: Wed, 03 Jan 2013 02:56:03 -0800
From: admin@example.org
To: liz@example.com
Subject: Hello World!
MIME-Version: 1.0
Content-Type: text/html; charset=windows-1252
Content-transfer-encoding: 8bit
And I think to myself... What a wonderful world!
--part_boundary--
但此消息仍会放置在收件箱中。我是否错过了一些其他方法来不将标签应用于邮件而不将其放入收件箱,或者这是一个错误?