Author cjw296
Recipients Sharebear, barry, christian.heimes, cjw296, loewis
Date 2009-03-05.13:06:52
SpamBayes Score 0.00235438
Marked as misclassified No
Message-id <1236258415.63.0.7175813637.issue1823@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2009-03-05 13:06:55cjw296setrecipients: + cjw296, loewis, barry, christian.heimes, Sharebear
2009-03-05 13:06:55cjw296setmessageid: <1236258415.63.0.7175813637.issue1823@psf.upfronthosting.co.za>
2009-03-05 13:06:54cjw296linkissue1823 messages
2009-03-05 13:06:52cjw296create