I'm trying to create e-mail with multipart/mixed content, with 2 HTML BodyParts (no attachments).
MIME-Version: 1.0
Date: Thu, 9 Dec 2021 13:44:01 +0100
Message-ID: <id@localhost>
Subject: This is Subject
From: test <foo@bar.com>
To: foo2@bar.com
Content-Type: multipart/mixed;
boundary="----main_boundary"
------main_boundary
Content-Type: multipart/alternative;
boundary="----header_boundary"
------header_boundary
Content-Type: text/html
Content-Transfer-Encoding: 7bit
<h2>Header before the main body</h2>
------header_boundary--
------main_boundary
Content-Type: multipart/alternative; boundary=boundary1
Content-Disposition: inline
--boundary1
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<b>Just HTML</b>
--boundary1--
------main_boundary--
This e-mail renders fine in all clients even mobile ones I've tested except Outlook and Windows Mail. Seems like Microsoft's clients ignore the Second body part and displays only the Header before the main body part.
Is there any workaround? I don't want to create just one html content.