【问题标题】:Maximum line length of markdown for HTML email?HTML电子邮件降价的最大行长?
【发布时间】:2014-12-15 23:42:51
【问题描述】:

我收到的 HTML 电子邮件具有内联样式和一些繁重的内容(迫使 Outlook 看到透明的 png),这导致行长度超过 1000 个字符的标记。文本远低于标准的 80 个字符。

我的 html 发件人服务不接受这 - 我收到了关于行太长的警告,这可能会导致某些客户端出错。

我已经彻底测试了这些电子邮件,并且我没有发现 HTML 本身的呈现有任何问题,但进一步阅读和调查该问题表明,实际上某些服务器可能会因为该长度而拒绝电子邮件,并且可能行缓冲区溢出。它仍然有效吗?我应该担心 html 电子邮件标记长度吗?毕竟,我们正处于 2015 年的边缘。

标记是这样的:

<img src="domain.com/gfx/logo_red.png" style="width: 257px; height: 79px; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; max-width: 100%; float: none; clear: none; display: inline; line-height: 0px; position: relative; behavior: expression((this.runtimeStyle.behavior='none')&amp;&amp;(this.pngSet?this.pngSet=true:(this.nodeName == 'IMG' &amp;&amp; this.src.toLowerCase().indexOf('.png')&gt;-1?(this.runtimeStyle.backgroundImage = 'none', this.runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src='' + this.src + '', sizingMethod='image')', this.src = './gfx/spacer.gif'):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url('domain.com/,).replace(')',''), this.runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src='' + this.origBg + '', sizingMethod='crop')', this.runtimeStyle.backgroundImage = 'none')),this.pngSet=true)); margin: 0; padding: 0; border: none;" /></a>

【问题讨论】:

    标签: html email outlook


    【解决方案1】:

    我会说你可以忽略这个特定的警告。您的发件人服务偏执,因为它没有意识到您正在发送 html 电子邮件。它可能很旧并且设计用于发送文本/纯电子邮件。几年前,一些非常糟糕的电子邮件客户端会截断包含多行的 url。

    但请确保您使用正确的 mime 类型 text/html 发送,或在多部分消息中使用 html。服务器没有理由因为宽度原因拒绝 html 电子邮件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-20
      • 1970-01-01
      • 2015-07-16
      • 2023-03-29
      • 2016-05-23
      相关资源
      最近更新 更多