[zope2-tracker] [Bug 642728] [NEW] MailHost, TypeError on nested MultiPart messages

Maik Derstappen 642728 at bugs.launchpad.net
Sun Sep 19 07:07:06 EDT 2010


Public bug reported:

The following part breaks, if we have an nested MultiPart Message like:

Content-Type: multipart/alternative; boundary="===============0490954888=="
MIME-Version: 1.0
Date: Sun, 27 Aug 2006 17:00:00 +0200
Subject: My multipart email
To: Foo Bar <foo at inqbus.de>
From: sender at domain.com

--===============0490954888==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable

This is plain text.

--===============0490954888==
Content-Type: multipart/related; boundary="===============2078950065=="
MIME-Version: 1.0

--===============2078950065==
Content-Type: text/html; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable

<p>This is html.</p>
--===============2078950065==--
--===============0490954888==--
 

-        for index, payload in enumerate(mo.get_payload()):
-            if not isinstance(payload, Message):
-                payload = message_from_string(payload)
-            charset_match = CHARSET_RE.search(payload['Content-Type'] or '')
-            if payload.get_filename() is None:
-                # No binary file
-                if charset and not charset_match:
-                    payload.set_charset(charset)
-                elif charset_match and not charset:
-                    charset = charset_match.groups()[0]
-            mo.get_payload()[index] = payload

** Affects: zope2
     Importance: Undecided
         Status: New


** Tags: mailhost

-- 
MailHost, TypeError on nested MultiPart messages
https://bugs.launchpad.net/bugs/642728
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.


More information about the zope2-tracker mailing list