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 david.caro
Recipients david.caro
Date 2011-01-26.23:47:24
SpamBayes Score 0.066555396
Marked as misclassified No
Message-id <1296085645.01.0.978524639714.issue11021@psf.upfronthosting.co.za>
In-reply-to
Content
When attaching a subpart to a multipart message, python should follow the recomendations of the rfcs and remove the MIME-Version header of each part, leaving only one MIME-Version header at the beggining of the message.


>>> from email.mime.multipart import MIMEMultipart
>>> from email.mime.text import MIMEText
>>> usermail=MIMEMultipart('alternative')
>>> part=MIMEText('text')
>>> print part
From nobody Thu Jan 27 00:33:50 2011
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

text
>>> usermail.attach(part)
>>> print usermail
From nobody Thu Jan 27 00:45:26 2011
Content-Type: multipart/alternative; boundary="===============1006894803=="
MIME-Version: 1.0

--===============1006894803==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

text
--===============1006894803==--
History
Date User Action Args
2011-01-26 23:47:25david.carosetrecipients: + david.caro
2011-01-26 23:47:25david.carosetmessageid: <1296085645.01.0.978524639714.issue11021@psf.upfronthosting.co.za>
2011-01-26 23:47:24david.carolinkissue11021 messages
2011-01-26 23:47:24david.carocreate