多部分/混合电子邮件在 Outlook/Microsoft Mail 中无法正确显示,文本显示为附件

问题描述 投票:0回答:1

我正在尝试创建包含

multipart/mixed
内容和 2 个 HTML BodyParts(无附件)的电子邮件。

MIME-Version: 1.0
Date: Thu, 9 Dec 2021 13:44:01 +0100
Message-ID: <id@localhost>
Subject: This is Subject
From: test <[email protected]>
To: [email protected]
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--

此电子邮件在除 Outlook 和 Windows Mail 之外的所有客户端(甚至是我测试过的移动客户端)中都呈现良好。似乎微软的客户端忽略了第二个正文部分,只显示

Header before the main body
部分。

有什么解决办法吗?我不想只创建一个 html 内容。

email outlook multipart
1个回答
0
投票

可能没有解决办法,我已经搜索过但没有找到。这里有一篇文章建议内联部分不会全部显示在 Outlook 中:https://techcommunity.microsoft.com/t5/exchange-team-blog/mixed-ing-it-up-multipart-mixed-messages -和你/ba-p/585841

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.