首页 > 解决方案 > 在 Outlook for Mac 与 OWA 中呈现组合电子邮件的方式之间的差异

问题描述

我正在尝试使用 body.setAsync(body, {coercionType: 'html'}) 使用生成的 HTML 电子邮件模板设置电子邮件正文。在 Outlook 桌面客户端 Mac、2016、2019)和 OWA 中呈现的内容之间存在明显差异。

是否有任何关于为不同客户提供一致体验的指导。是否有任何已知会导致 Outlook 桌面客户端呈现问题的 html 元素?

例如:电子邮件模板

<div>BEFORE HTML TAG</div>
<html style="overflow-y: hidden;">
    <div>before head element</div>
    <head>  
        <title>Title here inside head</title>
    </head>
    <div>after head element</div>
    <body style="height: auto; min-height: auto;">OUTLOOK LIGHT IN BODY
        <br />
        <br />
        Test Email with Subject formula
    </body>
</html>
<tr>
    <td>OUTLOOK LIGHT Footer
        <br />
        <br />
        Test Email with Subject formula
        <br />
        <br />
    </td>
</tr>

OWA 电子邮件正文:


BEFORE HTML TAG
before head element
after head element
OUTLOOK LIGHT IN BODY

Test Email with Subject formula OUTLOOK LIGHT Footer 

Test Email with Subject formula 

Outlook for Mac 电子邮件正文:

OUTLOOK LIGHT IN BODY

Test Email with Subject formula

Outlook for Mac HTML 使用 body.getAsync('html')

<html>

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 15 (filtered)">
<style>
<!--
 /* Font Definitions */
 @font-face
    {font-family:"Cambria Math";
    panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
    {font-family:Calibri;
    panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
    {margin:0in;
    margin-bottom:.0001pt;
    font-size:12.0pt;
    font-family:"Calibri",sans-serif;}
.MsoChpDefault
    {font-family:"Calibri",sans-serif;}
@page WordSection1
    {size:8.5in 11.0in;
    margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
    {page:WordSection1;}
-->
</style>

</head>

<body lang=EN-US>

<div class=WordSection1>

<p class=MsoNormal>OUTLOOK LIGHT IN BODY<br>
<br>
Test Email with Subject formula</p>

<p class=MsoNormal>&nbsp;</p>

</div>

</body>

</html>

每个客户端中呈现的内容之间存在差异。

标签: outlook-addinoutlook-web-addinsoutlook-for-mac

解决方案


OWA 和本机客户端之间的消息呈现引擎是不同的。Mac、Outlook 2016 和 Outlook 2019 都使用相同的渲染引擎,但是它们都有不同的版本,因为微软已经对其进行了迭代。我们不保证 body.getAsync 和 body.setAsync 是幂等的。. 客户端将强制传递的值以使其渲染效率和支持的保真度。请向我们的UserVoice添加一个请求,请求为 HTML 提供更一致的支持的正文 API。


推荐阅读