ZF-5618: Plain Text Alternative gets broken if setType->Zend_Mime::MULTIPART_RELATED


I've noticed that after switching the type of a mail object to


the received mail does not longer consists the plain text alternative.

I've tested it with Apple Mail. After switching to MULTIPART_ALTERNATIVE or default, the alternative plain text version works again like a charm.

I think the problem relies to the order of MIME items in the raw mail.

Here's the beginning of a MULTIPART_RELATED mail {quote} Return-Path: mail@xxxx.org X-Original-To: support@xxxxx.de Delivered-To: xxxx.de_support@mail.omoo.de Received: from localhost (localhost []) (Authenticated sender: xxxx.org_mail) by mail.omoo.de (Postfix) with ESMTP id 0A5AE4008D for support@vitap.de; Thu, 22 Jan 2009 08:27:29 +0100 (CET) From: xxxxx P mail@xxxxx.org Subject: xxxx: ONE WISH MELDUNG To: xxx xx xxxx support@xxxx.de Date: Thu, 22 Jan 2009 08:27:29 +0100 Content-Type: multipart/related; charset="utf-8"; boundary="=_9b6951eb0bf5eea2d972690bf5245625" MIME-Version: 1.0 Message-Id: 20090122072729.0A5AE4008D@mail.xxxxx.de

This is a message in Mime Format. If you see this, your mail reader does not support this format.

--=_9b6951eb0bf5eea2d972690bf5245625 Content-Type: multipart/alternative; boundary="=_5fec644199e2305f05c0961ba50539f9" Content-Transfer-Encoding: 8bit

--=_5fec644199e2305f05c0961ba50539f9 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

xxxxx {quote}

how you can easily see the Content-Type: text/plain still exists, but before stands Content-Type: multipart/alternative which maybe brokes the text/plain section?

I'm no pro with MIME and co, but I'm thinking it's a bug. I stripped my code down and removed attachments and co so that I've got only text html and text plain only. Again, the plain version gets broken by using RELATED.

if more informations are needed I'll post them


screenshot from Apple Mail.

Adding screenshot by ISSUE tracker (clipboard) didn't work

hi nico,

no reply yet?

did you read already this issue??

thx and regards, Marco Frank (maintainer zfforum.de)

I have no evidence yet, but this issue may be related to ZF-7874 .

I found this issue is not related to ZF-7874. So, I removed link.

Sorry, I have been inactive since last April.

Can you please provide the code to reproduce, the current output, and the expected output? Thanks.