This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients barry, macfreek, r.david.murray
Date 2013-12-28.17:46:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1388252761.48.0.0930489552937.issue20083@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for the suggestion.

Once the issue 11783 patch is committed, smtplib can be changed to use formataddr in quoteaddr, which will result in the domain being punycoded automatically.  (It's too bad I forgot about that issue, since the 3.4 beta deadline has already passed :(

The input to the commands is string, not bytes, so you can already pre-encode yourself, as you noted.  The commands don't accept bytes, and should not, since the data they cause to be sent on the wire may not contain non-ASCII characters; there is thus no need to generate binary.  SMTPUTF8 will of course require generating binary data in these contexts, but in that case the correct way to generate the binary is by utf-8 encoding the unicode input, so there will again be no reason for the commands to accept binary input, and it will be better if they don't.  (If you need to generate invalid data, say for a test scenario, you can drop down to executing 'send' calls manually.)

(Note: using the 'u' prefix in python3, while supported for backward compatibility, is only confusing when used outside of that context...I thought you were talking about 2.7 until I read carefully.)
History
Date User Action Args
2013-12-28 17:46:01r.david.murraysetrecipients: + r.david.murray, barry, macfreek
2013-12-28 17:46:01r.david.murraysetmessageid: <1388252761.48.0.0930489552937.issue20083@psf.upfronthosting.co.za>
2013-12-28 17:46:01r.david.murraylinkissue20083 messages
2013-12-28 17:46:00r.david.murraycreate