New submission from David Caro <david.caro.este...@gmail.com>:

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==--

----------
components: Library (Lib)
messages: 127161
nosy: david.caro
priority: normal
severity: normal
status: open
title: email MIME-Version headers for each part in multipart message
type: behavior
versions: Python 2.6, Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11021>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to