【问题标题】:HTML text displayed twice when opening the email from Outlook从 Outlook 打开电子邮件时 HTML 文本显示两次
【发布时间】:2020-09-24 08:44:05
【问题描述】:

我在电子邮件中构建了一个带有个性化代码的 HTML 块,我想知道为什么从桌面设备在 Outlook 中打开电子邮件时文本会显示两次,只有在使用 Windows 操作系统时。

<!--[if mso]>
        <v:rect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" style="height:42px;v-text-anchor:middle;width:218px;" arcsize="5%" strokecolor="#ffffff" fillcolor="#ffffff">
          <w:anchorlock/>
          <center style="color:#1672b9;font-family:'Noto Sans', sans-serif;font-size:12px; letter-spacing:1.5px; font-weight:bold;border-radius: 15px;">Personalized code</center>
        </v:rect>
      <![endif]-->
      <a style="background-color:#ffffff;border-radius: 15px;color:#1672b9 !important;display:inline-block;font-family:'Noto Sans', sans-serif;font-size:12px;line-height:44px;text-align:center;text-decoration:none;width:100%;-webkit-text-size-adjust:none;mso-hide:all; font-weight:bold; letter-spacing:3px;">Personalized code</a>

【问题讨论】:

  • 因为条件注释内外都有文字。
  • 谢谢,代码应该如何?抱歉,我不是 HTML 专家。
  • 您希望第二个&lt;a&gt; 不出现在 Outlook 中还是第一个?

标签: html email outlook salesforce-marketing-cloud


【解决方案1】:

使用这个:

<!--[if mso]>
  <v:rect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" style="height:42px;v-text-anchor:middle;width:218px;" arcsize="5%" strokecolor="#ffffff" fillcolor="#ffffff">
    <w:anchorlock/>
    <center style="color:#1672b9;font-family:'Noto Sans', sans-serif;font-size:12px; letter-spacing:1.5px; font-weight:bold;border-radius: 15px;">Personalized code</center>
  </v:rect>
<![endif]-->
<![if !mso]>
  <a style="background-color:#ffffff;border-radius: 15px;color:#1672b9 !important;display:inline-block;font-family:'Noto Sans', sans-serif;font-size:12px;line-height:44px;text-align:center;text-decoration:none;width:100%;-webkit-text-size-adjust:none;mso-hide:all; font-weight:bold; letter-spacing:3px;">Personalized code</a>
<![endif]>

另请参阅:"How do I make an “else” in an IE HTML conditional?"

【讨论】:

  • 但是这段代码不会为非 Outlook 收件箱显示任何内容,对吧?它仍然在 Outlook 中显示文本两次。
猜你喜欢
  • 2015-06-04
  • 1970-01-01
  • 2011-11-20
  • 2019-06-07
  • 2021-05-10
  • 1970-01-01
  • 1970-01-01
  • 2014-09-20
  • 2023-03-12
相关资源
最近更新 更多