email.encoders.encode_base64 creates one line only

spam at uce.gov spam at uce.gov
Thu Feb 10 16:51:07 CET 2011


> This is with python 3.1.2 (r312:79147). I have not tried with 2.7.
>
> When I create an attachment with email.mime.image.MIMEImage, by default it
> uses email.encoders.encode_base64 for the encoder, but that results in a
> single line base64 string, instead of the recommended multiple 76-chars lines.
>
> This works with most MTA and MUA, but some of them choke on it.
>

In case somebody runs into the same issue:
http://bugs.python.org/issue9298

And I added a work around if you need a solution before this bug is fixed at:
http://bugs.python.org/issue11156#msg128213

-- 
Yves.                                                  http://www.SollerS.ca/
                                                        http://blog.zioup.org/



More information about the Python-list mailing list