message/*
message/rfc822
File extensions: .eml
RFC 822 email message — the .eml file type.
What is message/rfc822?
message/rfc822 is the MIME content type for a complete email message — its headers (From, To, Subject, Date) plus the body and any attachments — serialized as a single file. This is the file type behind the .eml extension that mail clients like Outlook, Apple Mail, and Thunderbird produce when you save or export a message. As a multipart body part it is how one email is attached inside another (forwarded as an attachment). A closely related type, message/rfc822-headers, carries only the header block without the body — used in delivery and bounce reports.
Typical usage
Email exports (.eml), saved messages, email archives, forwarded-as-attachment, and bounce / delivery status reports (message/rfc822-headers).
Common gotchas
An .eml file is just plain text following RFC 5322, so it opens in any text editor — but attachments inside are Base64-encoded. The variant message/rfc822-headers is a distinct type that includes only the headers, not the message body.
HTTP header example
Response header
Content-Type: message/rfc822Reference
RFC 822 / RFC 5322
Frequently asked questions
What is the message/rfc822 MIME type?
message/rfc822 is the MIME content type for a complete email message — its headers (From, To, Subject, Date) plus the body and any attachments — serialized as a single file. This is the file type behind the .eml extension that mail clients like Outlook, Apple Mail, and Thunderbird produce when you save or export a message. As a multipart body part it is how one email is attached inside another (forwarded as an attachment). A closely related type, message/rfc822-headers, carries only the header block without the body — used in delivery and bounce reports.
What file extension does message/rfc822 use?
Files served as message/rfc822 typically use the extension .eml. The most common is .eml.
How do I set the Content-Type for message/rfc822?
Send the HTTP response header Content-Type: message/rfc822. Email exports (.eml), saved messages, email archives, forwarded-as-attachment, and bounce / delivery status reports (message/rfc822-headers).
Is message/rfc822 an official MIME type?
Yes. message/rfc822 is officially registered with IANA (RFC 822 / RFC 5322), so standards-conformant clients recognize it.
What are common mistakes with message/rfc822?
An .eml file is just plain text following RFC 5322, so it opens in any text editor — but attachments inside are Base64-encoded. The variant message/rfc822-headers is a distinct type that includes only the headers, not the message body.