email.iterators.body_line_iterator()

email.iterators.body_line_iterator(msg, decode=False)

This iterates over all the payloads in all the subparts of msg, returning the string payloads line-by-line. It skips over all the subpart headers, and it skips over any subpart with a payload that isn’t a Python string. This is somewhat equivalent to reading the flat text representation of the message from a file using readline(), skipping over all the intervening headers.

Optional decode is passed through to Message.get_payload.

doc_python
2016-10-07 17:32:34
Comments
Leave a Comment

Please login to continue.