[issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header
Chris Withers
report at bugs.python.org
Tue Mar 31 09:16:02 CEST 2009
Chris Withers <chris at simplistix.co.uk> added the comment:
It's probably worth noting that changing:
from email.mime.text import MIMEText
m = MIMEText('foo')
m['subject']='something long'
...to:
from email.header import Header
m = MIMEText('foo')
m['subject']=Header('something long')
...will do folding without the \t problem, even in Python 2.6
I guess the moral of the story is that all headers should really be
header objects. I think Barry has some ideas on that ;-)
----------
keywords: -patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1974>
_______________________________________
More information about the Python-bugs-list
mailing list