[issue14062] UTF-8 Email Subject problem

2012-03-14 Thread R. David Murray
R. David Murray added the comment: Thanks for the bug report. I thought we had tests for processing Header objects when serializing a message using BytesParser, but clearly we didn't. And thanks Tatiana and Martin for issue review and testing. -- resolution: -> fixed status: open ->

[issue14062] UTF-8 Email Subject problem

2012-03-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset d0bf40ff20ef by R David Murray in branch '3.2': #14062: fix BytesParser handling of linesep for Header objects http://hg.python.org/cpython/rev/d0bf40ff20ef New changeset 7617f3071320 by R David Murray in branch 'default': #14062: fix BytesParser h

[issue14062] UTF-8 Email Subject problem

2012-03-14 Thread R. David Murray
R. David Murray added the comment: OK, got it. When I created BytesParser I turned the 'NL' constant into a class attribute, but in the line that handles Header objects in BytesParser I failed to change NL to self._NL. So when send_message calls flatten with linesep='\r\n', in that one plac

[issue14062] UTF-8 Email Subject problem

2012-03-14 Thread Martin v . Löwis
Martin v. Löwis added the comment: I also attach a stand-alone version. To run this locally, run smtpdX.Y.py -dn localhost:2525 -- Added file: http://bugs.python.org/file24844/a.py ___ Python tracker

[issue14062] UTF-8 Email Subject problem

2012-03-14 Thread Martin v . Löwis
Martin v. Löwis added the comment: I digged a little bit further. The data being sent is 'Content-Type: multipart/mixed; boundary="===1981330074035035012=="\r\nMIME-Version: 1.0\r\nFrom: rzro...@seznam.cz\r\nTo: msla...@volny.cz\r\nSubject: =?utf-8?b?xb5sdcWlb3XEjWvDvSBrxa/FiA==?

[issue14062] UTF-8 Email Subject problem

2012-03-14 Thread R. David Murray
R. David Murray added the comment: I think the next thing to do would be to replace the call to send_message with code that calls BytesGenerator to write the message out to disk, and diff the output of the two versions (normal subject and hand-encoded subject). Maybe that will give us a clue

[issue14062] UTF-8 Email Subject problem

2012-03-14 Thread Michal Sladek
Michal Sladek added the comment: Changing code to: encodedSubject = '=?utf-8?b?{0}?='.format(base64Subject) still works properly with smtp.seznam.cz server -- ___ Python tracker ___

[issue14062] UTF-8 Email Subject problem

2012-03-13 Thread R. David Murray
R. David Murray added the comment: It makes no sense that changing how Subject is generated would affect the later formatting of the mime header. There is no coupling that I'm aware of in the code. I notice that your handcrafted version uses uppercase for the charset and CTE code. Can you

[issue14062] UTF-8 Email Subject problem

2012-03-13 Thread Michal Sladek
Michal Sladek added the comment: I tested the code again. Using Gmail SMTP server produces correct results, using server smtp.seznam.cz leads to a problem (I should mention here, that Seznam is the largest free mail provider in the Czech Republic). Here are the differences on receiving side.

[issue14062] UTF-8 Email Subject problem

2012-03-13 Thread Tatiana Al-Chueyr
Tatiana Al-Chueyr added the comment: Hi msladek! I tried to reproduce your bug using Python 3.2.2 on MacOS X, but didn't manage - all worked fine. I used gmail both to send and receive the message, on SSL: smtpPort = '465' smtpSrv = 'smtp.gmail.com' As I'm no SMPTP nor email expert, I

[issue14062] UTF-8 Email Subject problem

2012-02-20 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue14062] UTF-8 Email Subject problem

2012-02-20 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue14062] UTF-8 Email Subject problem

2012-02-20 Thread Michal Sladek
New submission from Michal Sladek : Hello! I think there is a problem when adding UTF-8 subject to email message. I wrote following function (its code is based on examples I found in offical docs) which should send an email with UTF-8 subject, UTF-8 plain text body and attached file when all