Content type for msg files

  • Thread starter Thread starter David C
  • Start date Start date
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
 
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"
 
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
 
Thank you. That worked perfect.

David
Alexey Smirnov 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
 
Back
Top