Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > email.encoders.encode_base64 creates one line only

Reply
Thread Tools

email.encoders.encode_base64 creates one line only

 
 
spam@uce.gov
Guest
Posts: n/a
 
      02-07-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.

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

--
Yves. http://www.SollerS.ca/
http://blog.zioup.org/
 
Reply With Quote
 
 
 
 
spam@uce.gov
Guest
Posts: n/a
 
      02-10-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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: ElementTree write creates large one line XML file .... Robert Kern Python 0 05-28-2010 12:13 AM
buffer creates only read-only buffer? Neal Becker Python 0 01-08-2009 01:58 AM
Roxio Easy CD & DVD - Disc Creator Classic creates read-only dvd-rw disks Renee Roberts Computer Support 6 08-07-2006 12:05 AM
enum creates undeclared identifier (only sometimes?) spoordp@cox.net C++ 8 06-25-2005 11:48 AM
CSS aligning two things on one line with one left and one right news.frontiernet.net HTML 6 04-16-2004 02:44 AM



Advertisments