Message61866
Somewhere in email.MIMEText.MIMEText.as_string (I'm not sure where) long
subject headers are folded using a newline followed by a tab:
>>> from email.MIMEText import MIMEText
>>> m = MIMEText('foo')
>>> m['Subject']='AA '*40
>>> m.as_string()
'Content-Type: text/plain; charset="us-ascii"\nMIME-Version:
1.0\nContent-Transfer-Encoding: 7bit\nSubject: AA AA AA AA AA AA AA AA
AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA\n\tAA AA AA AA AA AA AA AA
AA AA AA AA AA AA AA AA AA \n\nfoo'
While RFC 822 section 3.1.1 doesn't forbid this type of folding, the
current behaviour mis-renders in both Thunderbird and Outlook.
Messages generated by Thunderbird and Outlook represent the above
subject as follows:
'Content-Type: text/plain; charset="us-ascii"\nMIME-Version:
1.0\nContent-Transfer-Encoding: 7bit\nSubject: AA AA AA AA AA AA AA AA
AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA\n AA AA AA AA AA AA AA AA
AA AA AA AA AA AA AA AA AA \n\nfoo'
Could the email library be adjusted to do the same? Years of wondering
why mails re-sent by mailman, mails from any number of python web
systems and recent complaints from customers of mine of mis-rendered
emails could be solved by doing so. |
|
Date |
User |
Action |
Args |
2008-01-30 14:48:05 | cjw296 | set | spambayes_score: 0.0860421 -> 0.08604213 recipients:
+ cjw296 |
2008-01-30 14:48:05 | cjw296 | set | spambayes_score: 0.0860421 -> 0.0860421 messageid: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> |
2008-01-30 14:48:04 | cjw296 | link | issue1974 messages |
2008-01-30 14:48:02 | cjw296 | create | |
|