How to get email subject from gmail using google API using python?

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

+3


source to share


1 answer


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

Payload header contains theme

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

      



payload.headers [] list List of headers in this part of the message. For the top-level portion of a message that represents the entire payload of the message, it will contain standard RFC 2822 headers such as To, From, and Subject.

Google developer site has python code to help you get started python quickstart

+4


source







All Articles