How to get subject of email from gmail using google API using python? [closed]

拟墨画扇 提交于 2019-12-10 14:17:19

问题


How to get the subject of a message using Gmail API using python?


回答1:


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

Pay load header contains subject

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

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.

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



来源:https://stackoverflow.com/questions/44280695/how-to-get-subject-of-email-from-gmail-using-google-api-using-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!