mirror of https://github.com/python/cpython
Fixing the file call in the rfc822.Message replacement example.
This commit is contained in:
parent
95ce1fcf8b
commit
b2efeff4a5
|
@ -2,7 +2,7 @@
|
||||||
from email.parser import Parser
|
from email.parser import Parser
|
||||||
|
|
||||||
# If the e-mail headers are in a file, uncomment this line:
|
# If the e-mail headers are in a file, uncomment this line:
|
||||||
#headers = Parser().parse(messagefile)
|
#headers = Parser().parse(open(messagefile, 'r'))
|
||||||
|
|
||||||
# Or for parsing headers in a string, use:
|
# Or for parsing headers in a string, use:
|
||||||
headers = Parser().parsestr('From: <user@example.com>\n'
|
headers = Parser().parsestr('From: <user@example.com>\n'
|
||||||
|
|
Loading…
Reference in New Issue