email.encoders.encode_base64 creates one line only

G

Guest

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.

Is this a bug, or do I need to write my own _encoder?
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top