Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は電子メール lib を使用して、次のような電子メールを解析します。
f = open('path/to/email','r') msg = email.message_from_file(f) print msg['From'] lmrn@mailexcite.com
しかしmsg、キーボディがないので、どうすればいいですか?
msg
使用できます
msg.get_payload()
メールの内容を取得します。これにより、マルチパート メッセージのメッセージ オブジェクトのリストが返されることに注意してください。(詳細はこちら)