Message83194
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? |
|
Date |
User |
Action |
Args |
2009-03-05 13:06:55 | cjw296 | set | recipients:
+ cjw296, loewis, barry, christian.heimes, Sharebear |
2009-03-05 13:06:55 | cjw296 | set | messageid: <1236258415.63.0.7175813637.issue1823@psf.upfronthosting.co.za> |
2009-03-05 13:06:54 | cjw296 | link | issue1823 messages |
2009-03-05 13:06:52 | cjw296 | create | |
|