发送电子邮件时是否需要换行? [英] Is it necessary to wrap long lines when sending emails?

查看:201
本文介绍了发送电子邮件时是否需要换行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Zend_Mail发送电子邮件。很少有文章(例如此页面的第一个例子)已经建议包裹长消息正文中的行。



问题:


  1. 是否有必要使用wordwrap(),以防任何行大于70个字符?


  2. 这个'70'数字来自哪里?

    / li>


解决方案

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:

  1. Is it necessary to use wordwrap(), in case any of line is larger than 70 characters?

  2. 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.

这篇关于发送电子邮件时是否需要换行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆