[ python-Bugs-1571841 ] email module does not complay with RFC 2046: CRLF issue

SourceForge.net noreply at sourceforge.net
Thu Oct 12 14:15:47 CEST 2006


Bugs item #1571841, was opened at 2006-10-06 01:30
Message generated for change (Settings changed) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1571841&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Andy Leszczynski (andrzejl)
>Assigned to: Barry A. Warsaw (bwarsaw)
Summary: email module does not complay with RFC 2046: CRLF issue

Initial Comment:
According to rfc2046, line breaks in MIME are CRLF.
However python just
uses LF like in the following example:

from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText

msg = MIMEMultipart()
msg['Subject'] = 'Our family reunion'
msg['From'] = '... at a.b'
msg['To'] = '... at x.y'
msg.epilogue = ''

msg.attach(MIMEText('aaaaaaaaaaaaaaaaaaaaaaaa'))

print `msg.as_string()`

gives:
'Content-Type: multipart/mixed;
boundary="===============1018679223=="\nMIME-Version:
1.0\nSubject: Our
family reunion\nFrom: a... at a.b\nTo:
c... at x.y\n\n--===============1018679223==\nContent-Type:
text/plain;
charset="us-ascii"\nMIME-Version:
1.0\nContent-Transfer-Encoding:
7bit\n\naaaaaaaaaaaaaaaaaaaaaaaa\n--===============1018679223==--\n'


Found in version 2.3 and 2.4 


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1571841&group_id=5470


More information about the Python-bugs-list mailing list