(msg, decode=False)
Iterate over the parts, returning string payloads line-by-line.

    Optional decode (default False) is passed through to .get_payload().
Iterate over the parts, returning string payloads line-by-line.
Iterate over the parts returning string payloads line - by - line .
def body_line_iterator(msg, decode=False):
    """Iterate over the parts, returning string payloads line-by-line.

    Optional decode (default False) is passed through to .get_payload().
    """
    for subpart in msg.walk():
        payload = subpart.get_payload(decode=decode)
        if isinstance(payload, str):
            yield from StringIO(payload)
def body_line_iterator ( msg , decode = False ) : for subpart in msg . walk ( ) : payload = subpart . get_payload ( decode = decode ) if isinstance ( payload , str ) : yield from StringIO ( payload )