email.encoders.encode_base64 creates one line only

Discussion in 'Python' started by spam@uce.gov, Feb 7, 2011.

  1. 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?

    --
    Yves. http://www.SollerS.ca/
    http://blog.zioup.org/
     
    , Feb 7, 2011
    #1
    1. Advertising

  2. 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

    --
    Yves. http://www.SollerS.ca/
    http://blog.zioup.org/
     
    , Feb 10, 2011
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. news.frontiernet.net
    Replies:
    6
    Views:
    1,169
    news.frontiernet.net
    Apr 16, 2004
  2. Posadas, Dennis
    Replies:
    1
    Views:
    363
    Martin v. =?iso-8859-15?q?L=F6wis?=
    Dec 10, 2003
  3. Replies:
    8
    Views:
    1,454
    Pete Becker
    Jun 25, 2005
  4. Neal Becker

    buffer creates only read-only buffer?

    Neal Becker, Jan 8, 2009, in forum: Python
    Replies:
    0
    Views:
    429
    Neal Becker
    Jan 8, 2009
  5. Robert Kern
    Replies:
    0
    Views:
    641
    Robert Kern
    May 28, 2010
Loading...

Share This Page