Malcolm Box <malcolm....@gmail.com> added the comment:

Echoing the comment of Thomas Viehmann, the current behaviour makes it 
impossible to use this library to generate a correct multipart/mixed message 
with 7_or_8_bit encoding on Unix.

The MIME standard specifies that headers are to be CRLF terminated - this is 
independent of any lower-level transport encoding.  

Binary bodies are simply octet sequences - so may contain \n or \r characters.

The correct MIME encoding would have the headers terminated with CRLF, and the 
bodies as raw byte sequences.  However on Unix, since the headers are generated 
with \n not CRLF, you can't even post-process this (e.g. 
message.as_string().replace('\n', '\r\n') as that will screw up the binary body 
data.

The current behaviour is basically wrong and should be fixed.

----------
nosy: +Malcolm.Box

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1349106>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to