This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients Malcolm.Box, barry, l0nwlf, manlioperillo, r.david.murray, t-v
Date 2010-10-20.01:33:07
SpamBayes Score 4.1323423e-05
Marked as misclassified No
Message-id <>
Malcolm: a Content-Transfer-Encoding of 8bit may only contain \r and \n characters as part of the line ending sequence.  8bit is *not* binary; to use a CTE of binary the SMTP server must support BINARYMIME, which I don't think is all that common yet.  At any rate, my up-to-date postfix server doesn't support it.

And in any case, the email package doesn't support the binary CTE, so it's kind of irrelevant anyway :)

All that said, however, it certainly seems useful to be able to generate crlf terminated messages as an option.  And it turns out that that capability is needed in order to be able to generate binary messages in Python3 while still remaining backward compatible with the behavior of Python2 when parsing binary messages (see issue 10134).  (Actually I think the scenario I'm finding problematic in Python3 is also problematic in Python2, it's just that there are tricks you can use to work around it in Python2 that aren't allowed in Python3 because of the byte/string separation.)

So, attached find a patch implementing a linesep option in Generator.flatten and Header.encode.

Note that this patch also fleshes out the currently abbreviated documentation for BytesGenerator.
Date User Action Args
2010-10-20 01:33:17r.david.murraysetrecipients: + r.david.murray, barry, t-v, manlioperillo, l0nwlf, Malcolm.Box
2010-10-20 01:33:17r.david.murraysetmessageid: <>
2010-10-20 01:33:15r.david.murraylinkissue1349106 messages
2010-10-20 01:33:14r.david.murraycreate