Jul 22, 2018
Here’s an anniversary gift I made for my wife: https://very-good-website.xyz/inbox-all/ and some scattered notes I took building it.
The source code for this is on github: https://github.com/jafow/inbox-all
walk()
when message is multipart.get_payload(decode=True)
msg['From']
property, but msg.get_from()
catches moreget_pyaload()
returns a
list of all parts of the message. calling get_payload()
on each of
those returns the body of the partwhen finding an multipart message, I was walking the message, but not iterating
over its parts, instead just calling m.get_paylaod()
from with in the
# etc ...
for part in msg.walk()
# should call part.get_payload()
# etc ...
Related tags: