我正在尝试使用body.setAsync( body,{coercionType:' HTML '})使用生成的html电子邮件模板来设置电子邮件正文。在Outlook桌面客户端( Mac,2016,2019)和OWA中呈现的内容有明显的差异。
关于在不同的客户端提供一致的体验,有什么指导意见吗?是否有任何已知的html元素会导致在Outlook桌面客户端中呈现时出现问题?
例如:电子邮件模板
<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 formulaOutlook for Mac HTML using 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> </p>
</div>
</body>
</html>在每个客户端中呈现的内容之间存在差异。
发布于 2019-08-10 07:04:30
OWA和本机客户端的消息呈现引擎是不同的。Mac,Outlook 2016和Outlook 2019都使用相同的渲染引擎,但是它们都有不同的版本,因为微软在上面迭代过。We do not guarantee that body.getAsync and body.setAsync are idempotent.。客户端将强制传递值,以使其以所支持的尽可能高的保真度高效地呈现。请向我们的UserVoice添加一个请求,以获得对HTML提供更一致支持的body API。
https://stackoverflow.com/questions/57435167
复制相似问题