什么是电子邮件主题长度限制? [英] What is the email subject length limit?

查看:1046
本文介绍了什么是电子邮件主题长度限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

互联网电子邮件主题行中允许有多少个字符?
我扫描了电子邮件的RFC ,但看不清楚多久它被允许成为。
我有一个同事想以编程方式验证它。

How many characters are allowed to be in the subject line of Internet email? I had a scan of The RFC for email but could not see specifically how long it was allowed to be. I have a colleague that wants to programmatically validate for it.

如果没有正式的限制,实践中建议的长度是多少?
干杯,

If there is no formal limit, what is a good length in practice to suggest? Cheers,

推荐答案

请参阅 RFC 2822 ,第2.1.1节开始。

See RFC 2822, section 2.1.1 to start.


有两个限制这个
标准位于一行中
个字符的数量。
字符的每一行必须不超过998
个字符,并且应该不超过
78个字符,不包括CRLF。

There are two limits that this standard 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.

随着RFC的规定,您可以通过将主题折叠多行来解决这个限制(而不是你应该)。

As the RFC states later, you can work around this limit (not that you should) by folding the subject over multiple lines.


每个标题字段在逻辑上都是一个
单行字符,其中包含
字段名,冒号和
字段主体。为方便起见,
和处理998/78个字符
每行限制,一个头字段的字段body
部分可以将
分割成多行表示;
这被称为折叠。一般的
规则是,无论此标准
允许折叠空格(而不是
简单WSP字符),CRLF可能在任何WSP之前插入
。对于
示例,标题字段:

Each header field is logically a single line of characters comprising the field name, the colon, and the field body. For convenience however, and to deal with the 998/78 character limitations per line, the field body portion of a header field can be split into a multiple line representation; this is called "folding". The general rule is that wherever this standard allows for folding white space (not simply WSP characters), a CRLF may be inserted before any WSP. For example, the header field:

       Subject: This is a test

可以表示为:

       Subject: This
        is a test


主题中超过78个字符听起来很合理。没有人想滚动查看整个主题行,重要的一些可能会在右边被切断。

The recommendation for no more than 78 characters in the subject header sounds reasonable. No one wants to scroll to see the entire subject line, and something important might get cut off on the right.

这篇关于什么是电子邮件主题长度限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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