.msg MIME type
Outlook messagedocuments
application/vnd.ms-outlookOutlook's binary message format. Not registered with IANA, but the type everyone uses for .msg files.
| MIME type | application/vnd.ms-outlook |
|---|---|
| Extensions | .msg |
| Content-Type | application/vnd.ms-outlook |
| Compress in transit? | No — already compressed |
| File signature | D0 CF 11 E0 A1 B1 1A E1 the OLE2 compound-file signature shared by legacy Office formats |
Good to know
- Only Outlook opens
.msgfiles natively. Convert them to.emlfor other mail clients or for archiving. - Browsers may report
.msguploads asapplication/octet-stream; check for the OLE2 signature instead of trusting the type.
Serve .msg files with the right type
The response header to send:
Content-Type: application/vnd.ms-outlook
Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:
application/vnd.ms-outlook msg;
AddType application/vnd.ms-outlook .msg
res.set("Content-Type", "application/vnd.ms-outlook");import mimetypes
mimetypes.add_type("application/vnd.ms-outlook", ".msg")<input type="file" accept=".msg,application/vnd.ms-outlook">
Check it
See what a server sends for a file, and what type a local file really is by its contents:
curl -sI https://example.com/file.msg | grep -i '^content-type:' file --mime-type file.msg
Frequently asked questions
What is the MIME type for .msg files?
application/vnd.ms-outlook.
What Content-Type header should a .msg file be served with?
Content-Type: application/vnd.ms-outlook. It's already compressed, so servers shouldn't gzip it.
How can I tell if a file is really a .msg?
Check its bytes rather than the extension: MSG files start with D0 CF 11 E0 A1 B1 1A E1 — the OLE2 compound-file signature shared by legacy Office formats. On the command line, file --mime-type name.msg does this for you.
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options