【问题标题】:List inbox messages using node.js gmail api使用 node.js gmail api 列出收件箱消息
【发布时间】:2016-11-09 06:04:31
【问题描述】:

我已经完成了this 演示,但是我不确定如何在收件箱中列出实际消息。我看过here,但我不确定如何将其合并到节点中?

提前致谢!对不起,如果这是公然obvios。

最好的,
-佐伊

【问题讨论】:

  • 你的问题我不清楚。你有什么要求?
  • 我想知道如何列出类似于实际 gmail 网站的收件箱上下文。我希望最终能够制作一个任务管理应用程序,向我展示我拥有的前 10 封电子邮件。谢谢!

标签: node.js gmail gmail-api


【解决方案1】:

按照以下步骤操作:

  1. 让你的node.jsclient
  2. enablepush notification(当新电子邮件到达时通知您)。
  3. HistoryId 包含在您收到的通知中。
  4. 根据history ID获取邮箱update
  5. 接收历史列表包含 message Id ,使用该消息 ID 和 get 电子邮件。

【讨论】:

  • 非常感谢!
  • 非常感谢,但是当我运行发布者指南演示时,我收到此错误:node index.js /home/zoe/Developer/gmailShell/index.js:132 pubsubClient.createTopic(topicName, (err, topic) => { ^ SyntaxError: Unexpected token > at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load ( module.js:356:32) 在 Function.Module._load (module.js:312:12) 在 Function.Module.runMain (module.js:497:10) 在启动时 (node.js:119:16) 在node.js:906:3
猜你喜欢
  • 1970-01-01
  • 2016-05-23
  • 2019-09-24
  • 2014-12-19
  • 1970-01-01
  • 1970-01-01
  • 2023-03-17
  • 2019-03-09
  • 2019-04-29
相关资源
最近更新 更多