New submission from Jakub Wilk <uba...@users.sf.net>:

>>> from email.mime.text import MIMEText
>>> from email.header import Header
>>> msg = MIMEText('dummy')
>>> h = Header('dummy\nX-Injected-Header: yes')
>>> msg['Subject'] = h
>>> print msg.as_string()
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: dummy
X-Injected-Header: yes

dummy

----------
components: Library (Lib)
messages: 86767
nosy: jwilk, pl
severity: normal
status: open
title: email.header.Header allow to embed raw newlines into a message
versions: Python 2.5, Python 2.6

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

Reply via email to