What is the content type for MHT files?
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)
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:
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
"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:
message/rfc822
RFC 822 - STANDARD FOR THE FORMAT OF ARPA INTERNET TEXT MESSAGES
Here is a hyperlink: message/rfc822
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With