Content type for msg files

D

David C

Our application has an aspx page that sets the Response.ContentType based on
the file extension of the file selected, e.g. if .doc it sets it to
"Application/msword", if .gif it sets it to "image/gif", etc. What would I
use for .msg files that come from Outlook? Thanks.

David
 
G

Guest

Our application has an aspx page that sets the Response.ContentType based on
the file extension of the file selected, e.g. if .doc it sets it to
"Application/msword", if .gif it sets it to "image/gif", etc. What would I
use for .msg files that come from Outlook? Thanks.

David, I think it should be "application/octet-stream"
 
G

Guest

David, I think it should be "application/octet-stream"

okay I think this one is better

Response.ContentType = "application/vnd.ms-outlook";

I'm not sure if it's version dependent or not, but for my Outlook 2002
it's working well

Don't forget to add

Response.AddHeader("Content-Disposition",
"inline;filename=newmessage.msg");

Or simply use

Response.AddHeader("Content-Disposition",
"attachment;filename=newmessage.msg");

This one should work without a content type
 
D

David C

Thank you. That worked perfect.

David
Anon User said:
okay I think this one is better

Response.ContentType = "application/vnd.ms-outlook";

I'm not sure if it's version dependent or not, but for my Outlook 2002
it's working well

Don't forget to add

Response.AddHeader("Content-Disposition",
"inline;filename=newmessage.msg");

Or simply use

Response.AddHeader("Content-Disposition",
"attachment;filename=newmessage.msg");

This one should work without a content type
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top