I know this is old, but I thought it should be clarified and explained in more detail...
@Guy Starbuck wrote:
message/rfc822
RFC 822 - STANDARD FOR THE FORMAT OF ARPA INTERNET TEXT MESSAGES
The problem with this answer is that MHTML files are not defined by RFC822.
The correct content-type for MHTML files (.mht, .mhtml) is multipart/related.
As stated above, RFC822 defines the format for internet text messages. The content-type message/rfc822 is used for text attachments within email messages [1][2].
Most of us have probably received a reply to an email where, instead of being quoted inline, the original message is included as an attachment. That attachment has a content-type of message/rfc822. In such emails, the content-types break down as follows:
multipart/mixed = entire message
text/plain = text of reply email
message/rfc822 = original email as attachment
On the other hand, as noted by @feeela, MHTML files are defined in RFC2557. MHTML files are comprised of many different parts, each of which can have a different content-type. However, RFC2557 defines the content-type of the entire file as multipart/related.
You can stream the contents of a .eml file to a browser with this content type and .mht as the extension, and the email will be rendered similar to the way it is rendered in an email client.
发布评论
评论(5)
message/rfc822
RFC 822 - ARPA 互联网文本消息格式标准
这是一个超链接: message/ rfc822
message/rfc822
RFC 822 - STANDARD FOR THE FORMAT OF ARPA INTERNET TEXT MESSAGES
Here is a hyperlink: message/rfc822
共同撰写了 MHT 规范的 Microsoft 似乎认为它应该是 message/rfc822” rel="nofollow noreferrer">此支持页面。
但规范中似乎没有给出特定的 MIME 类型:
RFC2557:聚合文档的 MIME 封装,例如 HTML (MHTML)
Microsoft, who co-authored the spec for MHT, seem to think that it should be '
message/rfc822
' on this support page.No specific MIME type seems to be given in the spec though:
RFC2557: MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)
我知道这已经很旧了,但我认为应该澄清并更详细地解释......
@Guy Starbuck 写道:
这个答案的问题是 MHTML 文件不是由 RFC822 定义的。
MHTML 文件(.mht、.mhtml)的正确内容类型是多部分/相关。
如上所述,RFC822 定义了互联网短信的格式 。 内容类型 message/rfc822 用于电子邮件中的文本附件 [1][2]。
我们大多数人可能都收到过一封电子邮件的回复,其中原始消息不是内嵌引用,而是作为附件包含在内。 该附件的内容类型为message/rfc822。 在此类电子邮件中,内容类型细分如下:
另一方面,正如 @feeela 所指出的,MHTML 文件定义于RFC2557。 MHTML 文件由许多不同的部分组成,每个部分可以有不同的内容类型。 然而,RFC2557 将整个文件的内容类型定义为多部分/相关。
[1] RFC1341:MIME(多用途互联网邮件扩展)
[2] 消息内容类型
I know this is old, but I thought it should be clarified and explained in more detail...
@Guy Starbuck wrote:
The problem with this answer is that MHTML files are not defined by RFC822.
The correct content-type for MHTML files (.mht, .mhtml) is multipart/related.
As stated above, RFC822 defines the format for internet text messages. The content-type message/rfc822 is used for text attachments within email messages [1][2].
Most of us have probably received a reply to an email where, instead of being quoted inline, the original message is included as an attachment. That attachment has a content-type of message/rfc822. In such emails, the content-types break down as follows:
On the other hand, as noted by @feeela, MHTML files are defined in RFC2557. MHTML files are comprised of many different parts, each of which can have a different content-type. However, RFC2557 defines the content-type of the entire file as multipart/related.
[1] RFC1341: MIME (Multipurpose Internet Mail Extensions)
[2] The message Content-Type
application/octet-stream
您可以使用此内容类型并将 .mht 作为扩展名将 .eml 文件的内容流式传输到浏览器,并且电子邮件的呈现方式与电子邮件客户端中的呈现方式类似。
application/octet-stream
You can stream the contents of a .eml file to a browser with this content type and .mht as the extension, and the email will be rendered similar to the way it is rendered in an email client.
“聚合文档的 MIME 封装,例如 HTML”(MHTML 或 MHT)是 1999 年在 RFC 2557。
其 MIME 类型为
multipart/lated
,扩展名为.mht
。另请参阅:
"MIME Encapsulation of Aggregate Documents, such as HTML" (MHTML or MHT) is an IETF standard proposed in 1999 in the RFC 2557.
Its MIME type is
multipart/related
and the extension is.mht
.See also: