我应该避免使用 HTML 格式的通知电子邮件吗?

发布于 2024-10-01 08:11:37 字数 248 浏览 0 评论 0原文

几年前,在向用户发送通知电子邮件时避免使用 HTML 格式而使用纯文本似乎已被接受,因为 a) 并非所有电子邮件阅读器都支持 HTML,b) HTML 格式的电子邮件更有可能进入用户的垃圾邮件文件夹。

这些论点在今天仍然有效吗?或者 HTML 电子邮件现在还可以使用吗?

我应该记住什么限制吗?

编辑:

我计划仅使用 HTML 的一小部分 - 粗体、斜体、链接、列表和表格就足够了。

A few years ago, it seemed to be accepted wisdom to avoid HTML formatting in favor of plain text when sending notification e-mails to users, because a) not all e-mail readers supported HTML and b) HTML-formatted e-mail was more likely to land in the user’s spam folder.

Are these arguments still valid today, or are HTML e-mails fair game now?

Any restrictions I should keep in mind?

EDIT:

I'm planning to use only a small subset of HTML -- bold, italic, links, lists and tables will be sufficient.

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

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

发布评论

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

评论(3

甜`诱少女 2024-10-08 08:11:37

让 html 电子邮件在任何地方正确工作是一项非常艰巨的任务(每个客户端似乎都支持 html / css 等的不同小子集)。

如果您决定发送 html 电子邮件,请务必发送多部分 mime 消息(同一电子邮件中的 html 和纯文本版本),以便不理解 html 的客户只能正确渲染文本。

Making html email work correctly everywhere is a very hard task (each client seems to support a different small subset of html / css etc.).

If you decide on sending html email, be sure to send multi-part mime messages (both html and plaintext versions in the same email) so clients which don't understand html can just render the text correctly.

鲜血染红嫁衣 2024-10-08 08:11:37

我相信 HTML 是当今的发展方向,我合作过的所有客户都使用 HTML 来呈现他们的电子邮件,但为了保证安全,您应该发送 HTML 和纯文本两种格式。使用.Net,只需创建一个AlternateView。

以下是我发现非常有用的一些资源

http://www.smashingmagazine.com/2010/01/19/design-and-build-an-email-newsletter-without-losing-your-mind/

http://www.mailchimp.com/kb/article/如何编码 html-电子邮件/

I believe HTML is the way to go these days, all clients I have worked with use HTML to render their emails, but to keep it safe, you should send it both formats, HTML and plaintext. With .Net its simply create an AlternateView.

Here are a couple of resources that I have found very useful

http://www.smashingmagazine.com/2010/01/19/design-and-build-an-email-newsletter-without-losing-your-mind/

http://www.mailchimp.com/kb/article/how-to-code-html-emails/

夏末的微笑 2024-10-08 08:11:37

根据电子邮件模板准备电子邮件 HTML。您可以找到许多用于准备和测试 html 电子邮件的服务。只需谷歌一下即可。

对于发送部分,请准备消息的纯文本版本,然后以多部分形式发送电子邮件。您可以使用 Zend Mail 等开源库或 MailChimp 等在线应用程序。这样,如果客户端应用程序不支持 HTML,则会显示纯文本版本。

Prepare your email HTML according to email templates. You can find many services for preparing and testing your html email. Just Google around.

And for sending part, prepare a plain text version of your message, and send the email as multipart. You can use an open source library like Zend Mail or an online app like MailChimp. In this way, if the client app doesn't support HTML, it's shown the plain text version instead.

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