发送邮件时需要换行吗?
我正在使用 Zend_Mail 发送电子邮件。很少有文章(例如此页面上的第一个示例)建议换行邮件正文中的长行。
问题:
如果任何行超过 70 个字符,是否有必要使用 wordwrap()?
这个“70”数字从何而来?
I'm using Zend_Mail to send emails. Few articles (like first example on this page) have suggested to wrap long lines in message body.
Questions:
Is it necessary to use wordwrap(), in case any of line is larger than 70 characters?
Where does this '70' figure come from?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
RFC 2822 和 5322 有一个名为“线路长度限制”的部分 (2.1.1):
看来,真正的限制是 998 个字符,而 78 个字符是您不需要担心的。
RFC 2822 and 5322 have a sections called Line Length Limits (2.1.1):
Sounds to me like the real limit is 998 characters and 78 is something that you don't really need to bother with.
AFAIR,70 ~ 78,更可能是 80 的“保存”版本,来自老式终端,每行显示 80 个字符。在很早的时候,这些终端只是愚蠢的打印机,需要在服务器上准备好输出。这个 80 又来自于古老的打孔卡。打孔卡的物理尺寸(因此与 80 张限制有些密切相关)来自通常用于存放打孔卡的钱盘。
人类和科技都很难摆脱旧习惯。我推荐第一个关于 Javascript 的 Crockford 讲座,了解更多历史:http://yuiblog.com/crockford
AFAIR, the 70 ~ 78, more likely a "save" version of 80, comes from good old terminals, which displayed 80 characters per row. In the very early days these terminals were just dumb printers that needed their output prepared on the server. This 80 in turn comes from good old punchcards. The punchcard's physical size (and therefore somewhat closely related the 80 limit) comes from money trays, which were often used to store punchcards.
Humans and technology have a hard time getting rid of old habits. I recommend the first Crockford on Javascript talk for more history: http://yuiblog.com/crockford