Chris Withers <ch...@simplistix.co.uk> added the comment: Okay, splitting this out a little. I've moved the exception when setting character set after adding parts out to [Issue5423].
Here's a simpler example of the problem with setting character sets on multiparts: >>> from email.MIMEMultipart import MIMEMultipart >>> msg = MIMEMultipart() >>> msg.set_charset('iso-8859-15') >>> print msg.as_string() MIME-Version: 1.0 Content-Type: multipart/mixed; charset="iso-8859-15"; boundary="===============1300027372==" Content-Transfer-Encoding: quoted-printable As a programmer, I don't think I've done anything wrong, but that mail is not valid and causes some fussy MTAs to barf and show the message as blank. That said, when would you ever need or want to set the character set on a MIMEMultipart? I have this in my code, but I suspect I was just sheep/paranoia programming. When would just making set_charset on a MIMEMultipart raise an exception cause problems? ---------- nosy: +cjw296 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1823> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com