电子邮件客户端是否将特定 ID 应用于 HTML 电子邮件?

发布于 2024-12-13 08:14:32 字数 202 浏览 3 评论 0原文

我目前正在编写一封 HTML 电子邮件,这真是一场噩梦。我已经非常接近完美的设计,但我的修改正处于一个客户的修复导致另一个客户的修复出现问题的阶段。我在某处读到(找不到)outlook 将 #outlook ID 应用于电子邮件正文。如果这发生在许多客户身上,这将改变他们的生活……谷歌也毫无成果——所以有人能分享一些关于这个话题的智慧之言吗?

谢谢

~哈雷

I'm currently coding up an HTML email and it's a friggin nightmare. I'm getting pretty close to a perfect design, but my modifications are at the stage where one client's fix causes problems for another client's fix. I read somewhere (can't find) that outlook applies an #outlook ID to the body of the email. This would be life changing if it happened for many clients... Google is being fruitless too- so can anybody share some wise words of wisdom on this topic?

Thanks,

~Harley

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

独行侠 2024-12-20 08:14:32

我的智慧之言是基于对 HTML 电子邮件这一噩梦的体验。
有些人总是将自己的垃圾应用于许多元素。所以当你问他们是否添加ID时,我问添加什么?你的第一个元素?所有元素?是的。很多时候他们都是这么做的。许多人不会搞太多事情。取决于邮件客户端。

我曾为许多知名客户制作过 HTML 电子邮件。最后,最佳实践是回到原始的、老式的 html。忘记 CSS。如果您完全基于 4.0 过渡 HTML 的旧规则以及代码鼎盛时期的所有劣质样式方法来设计和实现 HTML 时事通讯,那么您应该在所有客户端中表现良好。

如果需要,您可以添加 css,但它的依赖关系可能而且很可能更像是补丁而不是解决方案。

My words of wisdom are based on experience with the nightmare called HTML emails.
Some will always apply their own garbage to many elements. So when you ask if they add an ID, I ask add to what? Your first element? all elements? Yup. Many times they do. Many don't mess with much. Depends on the mail client.

I have done HTML emails for many large name clients. In the end the best practice is to go WAY back to raw, old school html. Forget CSS. If you design and implement your HTML newsletter based entirely off the old rules of 4.0 transitional HTML and all the inferior styling methods from the hayday of code, then you should be good in all clients.

You can add css if you want but it's dependencies like that that can and most likely will be more like a patch than a solution.

墨洒年华 2024-12-20 08:14:32

是的,Outlook 添加 ID、MSO 标签和大量其他垃圾的情况并不罕见。只需在通过 Outlook 后查看 HTML 电子邮件的源代码,您就会明白我的意思。

重要的是要让客户相信 HTML 电子邮件在所有电子邮件客户端上永远不会达到像素完美。支持越来越好,但背景图像、CSS 和盒子模型充其量也不稳定。

我能给出的最好建议是从 MailChip 模板开始,然后从那里开始工作。否则,简单的、基于表格的设计最适合所有客户。

同样来自 MailChip (http://kb.mailchimp.com/article/top-html-email-coding-mistakes/)

链接的 CSS 文件并不总是适用于 HTML 电子邮件,因此您必须使用
内联或嵌入式 CSS。通常,当您编写网页代码时,您将
标签之间嵌入的 CSS 代码。但有很多电子邮件
应用程序(尤其是基于浏览器的应用程序)去掉 HEAD 并
HTML 电子邮件的 BODY 标记
,因此您的 CSS 也会被删除。

Yes, it's not uncommon for Outlook to add IDs, MSO tags, and loads of other crap. Just view the source of the HTML email after it's passed through outlook and you'll see what I mean.

It's important to set your client's expectation that HTML emails will never be pixel perfect across all email clients. Support is getting better, but background images, CSS, and the box model are shaky at best.

The best advice I can give is to start with a MailChip template, and work from there. Otherwise, simple, table based designs work out best across all clients.

Also from MailChip (http://kb.mailchimp.com/article/top-html-email-coding-mistakes/)

Linked CSS files won't always work in HTML email, so you've got to use
inline or embedded CSS. Normally, when you code a web page, you put
the embedded CSS code in between your tags. But lots of email
applications (especially browser based ones) strip out the HEAD and
BODY tags of your HTML email
, so your CSS will get stripped too.

烟燃烟灭 2024-12-20 08:14:32

这可能有帮助:

<html>
<body>

<!--[if gte mso 9]><![endif]–>
gte mso 9
<!–[if gte mso 9]><![endif]–>

<!--[if !gte mso 9]><!---->
!gte mso 9
<!--<![endif]-->

<!--[if !mso]><!-->
!mso
<!--<![endif]-->

</body>
</html>

This might help:

<html>
<body>

<!--[if gte mso 9]><![endif]–>
gte mso 9
<!–[if gte mso 9]><![endif]–>

<!--[if !gte mso 9]><!---->
!gte mso 9
<!--<![endif]-->

<!--[if !mso]><!-->
!mso
<!--<![endif]-->

</body>
</html>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文