Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #75965
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!panix!gordon |
|---|---|
| From | John Gordon <gordon@panix.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: how to get the subject of email? |
| Date | Sun, 10 Aug 2014 02:01:06 +0000 (UTC) |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Lines | 16 |
| Message-ID | <ls6jp2$feg$2@reader1.panix.com> (permalink) |
| References | <mailman.12805.1407635303.18130.python-list@python.org> |
| NNTP-Posting-Host | panix2.panix.com |
| X-Trace | reader1.panix.com 1407636066 15824 166.84.1.2 (10 Aug 2014 02:01:06 GMT) |
| X-Complaints-To | abuse@panix.com |
| NNTP-Posting-Date | Sun, 10 Aug 2014 02:01:06 +0000 (UTC) |
| User-Agent | nn/6.7.3 |
| Xref | csiph.com comp.lang.python:75965 |
Show key headers only | View raw
In <mailman.12805.1407635303.18130.python-list@python.org> luofeiyu <elearn2014@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.
--
John Gordon Imagine what it must be like for a real medical doctor to
gordon@panix.com watch 'House', or a real serial killer to watch 'Dexter'.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
how to get the subject of email? luofeiyu <elearn2014@gmail.com> - 2014-08-09 18:41 -0700
Re: how to get the subject of email? John Gordon <gordon@panix.com> - 2014-08-10 02:01 +0000
Re: how to get the subject of email? luofeiyu <elearn2014@gmail.com> - 2014-08-09 22:37 -0700
Re: how to get the subject of email? luofeiyu <elearn2014@gmail.com> - 2014-08-09 22:52 -0700
csiph-web