我正在使用 Zend_Mail 发送电子邮件。很少有文章(例如 this page 上的第一个示例)建议在邮件正文中包含长行。
问题:
是否有必要使用 wordwrap(),以防任何一行大于 70 个字符?
“70”这个数字从何而来?
最佳答案
RFC 2822和 5322有一个称为行长度限制 (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
在我看来,真正的限制是 998 个字符,而 78 个字符您真的不需要费心。
关于php - 发送电子邮件时是否需要换行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2696433/