HTML 电子邮件:您还必须发送备用纯文本视图吗?
发送 HTML 电子邮件时,我知道最好也发送纯文本版本。
但我的问题是:您还必须发送纯文本版本吗?
有何影响?
When sending HTML e-mail, I understand that it's a best practice to send a plain text version as well.
But my question is: Must you send a plain text version as well?
What are the repercussions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
至少就 Outlook 2007 而言,没有任何影响。我们有一个内部应用程序,它仅以 HTML 格式发送电子邮件,而 Outlook 不会抱怨并呈现 HTML 内容。
发送纯文本版本的电子邮件只是常见的礼貌,以支持不支持 HTML 格式或将其客户端设置为仅呈现纯文本的电子邮件客户端。它实际上比您想象的更普遍,所以如果您可以询问用户的偏好或两者都发送。
At least as far as Outlook 2007 is concerned, there are no reprecussions. We have an internal app that sends out emails in HTML format only and Outlook doesn't complain and renders the HTML content.
Sending an email with a plain-text version is simply common courtesy to support email clients that either don't support HTML format, or have their client set to render plain-text only. It's actually more prevalent than you may think so if you can either ask the user their preference or send both.
你永远不必这样做。但是,如果收件人无法接收 HTML 电子邮件或其客户端不支持它们,则 HTML 很可能会显示为纯文本。此外,一些电子邮件提供商/客户端(例如 Verizon、GMail 或 Outlook)会删除某些标签,因此您的 HTML 格式不正确。
You never have to. If the recipient however, is unable to receive HTML emails or their client does not support them then chances are the HTML will be displayed as plain text. Also, some email providers/clients like Verizon, GMail or Outlook will strip out certain tags so you HTML is malformed.
理想情况下,您应该收集用户对电子邮件的偏好,并根据此偏好发送电子邮件,不可能猜测他们喜欢什么。这与其说是最佳实践,不如说是用户偏好,尽管现在用户的电子邮件客户端无法呈现 html 内容的情况很少见,但这并不排除电子邮件客户端阻止 html 内容(如 GMail、Outlook),除非明确用户允许的。
Ideally you should collect the user preference of email and send the email based on this preference, it is impossible to guess what they prefer. This is not so much a best practice thing as opposed to a user preference, though it is rare now that users have email clients incapable of rendering html content, this does not preclude however email clients blocking html content (like GMail, Outlook) unless explicitly allowed by the user.
以我的愚见,您必须考虑您要发送的邮件的收件人。我的意思是,他们是否有支持给定格式的邮件用户代理。
另外,您应该注意制作兼容的 HTML 电子邮件,否则将无法在每个邮件用户代理上正确解释。
希望有帮助,
On my humble opinion you must think on the receivers of the mail you are trying to send. I mean, if they have Mail User Agents that support a given format or not.
Also, you should be aware of making a compatible HTML e-mail otherwise it won't be interpreted right on every Mail User Agent.
Hope that helps,
想想,例如,Gmail界面在标题中显示电子邮件的第一行,Outlook也是如此,如果您发送没有纯文本版本的HTML电子邮件,则文本将不会显示,至少在我的情况。
我从几十封电子邮件中看到,它们通常包含一行内容:
我可以告诉您的另一件事是,例如,iPhone 首先下载纯文本消息,然后下载 html 格式的消息。
Think that, for example, Gmail interface shows in the header the first lines of the e-mail, and Outlook does too, if you send an HTML e-mail without plain text version, the text won't be displayed, at least in my case.
What I've seen from dozens of e-mails is that they normally include a line that tells:
Another thing that I can tell you is that, for example, the iPhone downloads first the plain text message, and later the html formatted one.