已发送空白 html 封电子邮件

Blank html email delivered

我正在从网站发送电子邮件。它在 Gmail、Outlook、Android、iPhone/iPad...但不是 Apple Mail (Yosemite) 中呈现良好。我试图修改 headers 但它似乎并不重要。我目前正在使用 mailgun 作为发件人,以防万一。这里有一些 headers...

(为了测试,我还发送了单行的 text/plain 格式,看看它是否有所作为。)

Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable


Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

这是最奇怪的部分,我从未遇到过。这是在 Apple Mail 中查看源代码时 HTML 的样子:

<table cellpadding=3D"0" cellspacing=3D"0" border=3D"0" align=3D"center" =
width=3D"700">

整封邮件都是空白的。我什至没有从纯文本中看到一条测试线。 Apple Mail 连接到 GMail 帐户。在 GMail 中查看邮件时显示正常。

事实证明,这并不是 Apple Mail 本身的问题。这是 npm mailcomposer 的一个问题,它发送了 quoted-printable 的默认传输选项编码。将其设置为 8bit 解决了问题。