且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用python使用Google API从gmail获取电子邮件主题?

更新时间:2023-01-27 13:21:00

Users.messages:list 返回消息列表。每封邮件都是 Users.messages 资源

Users.messages: list returns a list of messages. Each message is a Users.messages resource

有效负载标头包含主题

  "payload": {
    "partId": string,
    "mimeType": string,
    "filename": string,
    "headers": [
      {
        "name": string,
        "value": string
      }
    ],




payload.headers []列表此消息部分上的标头列表。对于代表整个消息有效负载的***消息部分,它将包含标准的RFC 2822电子邮件标头,例如To,From和Subject。

payload.headers[] list List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject.

Google开发人员网站上有python代码,可帮助您入门 python快速入门

There is python code on the google developer site which will help you get started python quickstart