找回密码
 立即注册
搜索
查看: 22|回复: 0

Content conversion

[复制链接]

8万

主题

-651

回帖

26万

积分

论坛元老

积分
261546
发表于 2025-10-31 03:15:48 | 显示全部楼层 |阅读模式



Header field name
Default value
Description




MIME-Version
1.0
This header field is the first MIME header field that appears in a MIME-formatted message. This header field appears after the other standard RFC 2822 header fields, but before any other MIME header fields. MIME-aware email clients use this header field to identify a MIME-encoded message. When this header field is absent, MIME-aware email clients identify the message as plain text.


Content-Type
text/plain
This header field identifies the media type of the message content as described in RFC 2046. A media type consists of a type, a subtype, and one or more optional parameters, such as a charset= parameter that defines the MIME character encoding. Types that begin with "x-" aren't standard. Subtypes that begin with "vnd." are vendor-specific. The Internet Assigned Numbers Authority (IANA) maintains a list of registered media types. For more information, see MIME Media Types.

The multipart media type allows for multiple message parts in the same message by using sections defined by different media types. Some Content-Type field values include text/plain, text/html, multipart/mixed, and multipart/alternative.


Content-Transfer-Encoding
7bit
This header field can describe the following information about a message: The encoding algorithm used to transform any non-US-ASCII text or binary data that exists in the message body.An indicator that describes the current condition of the message body.
There can be multiple values of the Content-Transfer-Encoding header field in a MIME message. When the Content-Transfer-Encoding header field appears in the message header, it applies to the whole body of the message. When the Content-Transfer-Encoding header field appears in one of the parts of a multipart message, it applies only to that part of the message.

When an encoding algorithm is applied to the message body data, the message body data is transformed into plain US-ASCII text. This transformation allows the message to travel through older SMTP messaging servers that only support messages in US-ASCII text. The values of the Content-Transfer-Encoding header field that indicate an encoding algorithm was used on the message body are as follows:
Quoted-printable: This encoding algorithm uses printable US-ASCII characters to encode the message body data. If the original message text is mostly US-ASCII text, Quoted-printable encoding gives somewhat readable and compact results. All printable US-ASCII text characters except the equal sign (=) character can be represented without encoding.Base64: This encoding algorithm is based primarily on the privacy-enhanced mail (PEM) standard defined in RFC 1421. Base64 encoding uses the 64-character alphabet encoding algorithm and output padding characters defined by PEM to encode the message body data. A Base64 encoded message is typically 33 percent larger than the original message. Base64 encoding creates a predictable increase in message size and is optimal for binary data and non-US-ASCII text.
Typically, you won't see multiple encoding algorithms used in the same message.

When no encoding algorithm has been used on the message body, the Content-Transfer-Encoding header field merely identifies the current condition of the message body data. The following values of the Content-Transfer-Encoding header field indicate that no encoding algorithms were used on the message body:
7bit: This value indicates that the message body data is already in the RFC 2822 format. Specifically, this means that the following conditions must be true: All lines of text must be less than 998 characters long.All characters must be US-ASCII text that have character values from 1 through 127.The CR and LF characters can only be used together to indicate the end of a line of text.
The whole message body may be 7bit, or part of the message body in a multipart message may be 7bit. If the multipart message contains other parts that have any binary data or non-US-ASCII text, that part of the message must be encoded using the Quoted-printable or Base64 encoding algorithms.

Messages that have 7bit bodies can travel between SMTP messaging servers by using the standard DATA command.
8bit: This value indicates that the message body data contains non-US-ASCII characters. Specifically, this means that the following conditions must be true: All lines of text must be less than 998 characters long.One or more characters in the message body have values larger than 127.The CR and LF characters can only be used together to indicate the end of a line of text.
The whole message body may be 8bit, or part of the message body in a multipart message may be 8bit. If the multipart message contains other parts that have binary data, that part of the message must be encoded using the Quoted-printable or Base64 encoding algorithms.

Messages that have 8bit bodies can only travel between SMTP messaging servers that support the 8BITMIME SMTP extension as defined in RFC 1652, such as servers running Exchange 2000 Server or newer versions. Specifically, this means that the following conditions must be true:
The 8BITMIME keyword must be advertised in the server's EHLO response.Messages are still transferred by using the SMTP standard DATA command. However, the BODY=8BITMIME parameter must be added to the end of the MAIL FROM command.Binary: This value indicates that the message body contains non-US-ASCII text or binary data. Specifically, this means that the following conditions are true: Any sequence of characters is allowed.There is no line length limitation.Binary message elements don't require encoding.
Messages that have Binary bodies can only travel between SMTP messaging servers that support the BINARYMIME SMTP extension as defined in RFC 3030, such as servers running Exchange 2000 Server or newer versions. Specifically, this means that the following conditions must be true:
The BINARYMIME keyword must be advertised in the server's EHLO response.The BINARYMIME SMTP extension can only be used with the CHUNKING SMTP extension. Chunking enables large message bodies to be sent in multiple, smaller chunks. Chunking is also defined in RFC 3030. The CHUNKING keyword must also be advertised in the server's EHLO response.Messages are transferred using the BDAT command instead of the standard DATA command.The BODY=BINARYMIME parameter must be added to the end of the MAIL FROM command when the message has a message body.
The values 7bit, 8bit, and Binary never exist together in the same multipart message. The values are mutually exclusive. The Quoted-printable or Base64 values may appear in a 7bit or 8bit multipart message body, but never in a Binary message body. If a multipart message body contains different parts composed of 7bit and 8bit content, the whole message is classified as 8bit. If a multipart message body contains different parts composed of 7bit, 8bit, and Binary content, the whole message is classified as Binary.



Content-Disposition
Attachment
This header field instructs a MIME-enabled email client on how it should display an attached file, and is described in RFC 2183. The values of this field may be Inline or Attachment. When the value of this field is Inline, the attachment is displayed in the message body. When the value of this field is Attachment, the attached file appears as a regular attachment separate from the message body. Other parameters are available when the value is Attachment, such as Filename, Creation-date, and Size.


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|usdt交易

GMT+8, 2025-11-30 23:29 , Processed in 0.109345 second(s), 20 queries .

Powered by usdt cosino! X3.5

© 2001-2025 Bitcoin Casino

快速回复 返回顶部 返回列表