【问题标题】:With GMail API, Is it possible to insert message to INBOX?使用 GMail API,是否可以将消息插入收件箱?
【发布时间】:2019-09-24 21:55:09
【问题描述】:

使用 GMail API,可以通过inserthttps://developers.google.com/gmail/api/v1/reference/users/messages/insert 将消息发送到收件箱

我面临的问题是在使用insert 时,邮件不会出现在收件箱中,用户必须转到“所有邮件”才能看到它们。

insert 消息进入收件箱的最佳方式是什么?导入?

【问题讨论】:

    标签: gmail-api


    【解决方案1】:

    您可以根据documentation设置请求正文:

    Request Body: {
       "raw": "string" // required property
       "labelIds": "["INBOX"]" // add this optional property
       "threadId": "string"
    }
    

    这是Type of Message labels 的完整列表。

    【讨论】:

    • 是的!我试图在插入它之后应用收件箱标签 并且它不起作用,但是当您将它作为insert 调用的一部分时它会起作用。谢谢!
    猜你喜欢
    • 2016-08-21
    • 1970-01-01
    • 1970-01-01
    • 2014-12-19
    • 1970-01-01
    • 1970-01-01
    • 2015-01-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多