gmail
gmail copied to clipboard
Documentation on Message Components (sender, to, content-transfer encoding, etc)
Three questions all of which are related to how the data is returned once fetched.
-
Is there some documentation on the different pieces of information retrieved with the message? I'm looking to return the body of the message .body, who sent it, content-transfer encoding, etc. I'm using some google aliases and want to separate things out and need both the message and the sender returned.
-
Along the same lines, could the object returned be simplified into a dict? That would make driving through the data a little easier although potentially cumbersome if you pull a large number of emails.
-
You might consider adding some base64 code to decode the message. If you return a dict and see the content-transfer-encoding = 64 you could call the following type of "fix" for the text.
Example: Content-Transfer-Encoding: base64 text=base64.decodestring(messages[0].body)
Great project!