我正在使用 Zend_Mail 发送电子邮件.很少有文章(例如 此页面 上的第一个示例)建议将长换行消息正文中的行.
问题:
是否有必要使用 wordwrap(),以防任何行超过 70 个字符?
这个70"数字从何而来?
RFC 2822 和 5322 有一个部分称为行长度限制(2.1.1):
<块引用>该规范对数量有两个限制一行中的字符.每行字符不得超过998 个字符,并且应该不超过 78 个字符,不包括CRLF.
<块引用>
...
<块引用>
比较保守的78字推荐是容纳显示这些的用户界面的许多实现可能会截断或灾难性地包装显示的消息每行超过 78 个字符,尽管这样实现不符合本目的规格
在我看来,真正的限制是 998 个字符,而 78 个字符是您真正不需要理会的.
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?
RFC 2822 and 5322 have a sections called Line Length Limits (2.1.1):
There are two limits that this specification places on the number of characters in a line. Each line of characters MUST be no more than 998 characters, and SHOULD be no more than 78 characters, excluding the CRLF.
...
The more conservative 78 character recommendation is to accommodate the many implementations of user interfaces that display these messages which may truncate, or disastrously wrap, the display of more than 78 characters per line, in spite of the fact that such implementations are non-conformant to the intent of this specification
Sounds to me like the real limit is 998 characters and 78 is something that you don't really need to bother with.
这篇关于发邮件时需要排长队吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!