为什么我的HTML电子邮件签名在Outlook中显示为截断



我使用HTML代码已经两年了。。。我遵循了关于如何做到这一点的说明https://blog.gimm.io/how-to-create-an-html-email-signature/

我用webstorm构建/编辑了代码。当我在chrome中测试打开代码时,这个布局看起来很完美。。。但当我把它作为免责声明复制粘贴到outlook中时,它出现在收到的电子邮件中,就像变成了一个不可下载的图像,只有一行文字。(outlooks关于如何从管理门户添加签名的说明,我必须为多个人这样做。(似乎我只能附加一个图像,所以这是管理门户规则的一部分。页面目前不允许我输入代码示例抱怨

我缺少什么才能使这项工作正常进行?

<!DOCTYPE html>
<html xmlns="w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Your New Email Signature!</title>
<style>a{text-decoration: none}</style>
</head>
<body>
<table id="zs-output-sig" border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;font-size:1px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse; width:500px;">
<tbody>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;font-size:1px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse;">
<tbody>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;font-size:1px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse;">
<tbody>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;font-size:1px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse;">
<tbody>
<tr>
<td>
  <table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;font-size:1px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse;">
      <tbody>
          <tr>
              <td style="border-collapse:collapse;font-family:Calibri, Helvetica, sans-serif;font-size:14.0px;font-style:normal;line-height:16px;font-weight:normal;color:#414141;"><span style="font-family:Calibri, Helvetica, sans-serif;font-size:14.0px;font-style:normal;line-height:16px;font-weight:normal;color:#414141; display:inline;">Regards,</span></td>
          </tr>
          <tr>
              <td style="border-collapse:collapse;padding-bottom:10px;height:10px;"></td>
          </tr>
      </tbody>
  </table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;font-size:1px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse;">
<tbody>
<tr>
<td width="152">
<table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;font-size:1px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse;">

Outlook不显示base64图像,默认情况下可能会阻止任何web图像。如果您需要使用图像,最好的解决方案是通过将图像附加到电子邮件项目来嵌入图像,然后通过使用cid:前缀的特殊符号来引用这些图像。

mail.Attachments.Add "D:ImageFile.img", olByValue, 0
sImgName = "ImageFile.img" 
mail.HTMLBody = "<img src='cid:" & sImgName & "'" & " ><br>" 'Mention only the image file name not its path

事实上,Outlook使用Word作为渲染引擎。您可以在Word HTML和CSS Rendering Capabilities in Outlook文章中了解支持和不支持的HTML元素、属性和级联样式表属性。

我发现Outlook有一个字符截断!在代码本身到达任何可见内容之前,我的代码就被破坏了。根据微软的一位代表的说法,微软这样做是为了只有经过批准的第三方(你必须付费(才能创建漂亮的电子邮件签名。

最新更新