message = email.message_from_bytes(text)
I get it ,
print(message['Subject']) #can get the subject
But how can i get the body content of message?
no , message['Body'] or message['Content']
On 8/9/2014 7:01 PM, John Gordon wrote:
In <mailman.12805.1407635303.18130.python-l...@python.org> luofeiyu
<elearn2...@gmail.com> writes:
message = email.message_from_string(str(text)).get('subject')
message # nothing displayed
Try using email.message_from_bytes() instead.
Also have a look at
http://stackoverflow.com/questions/19508393/python-email-parsing-issue
for a question very similar to yours. Perhaps something in the code
will help.
--
https://mail.python.org/mailman/listinfo/python-list