473,385 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Content type for msg files

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
Sep 24 '07 #1
3 13616
On Sep 24, 7:23 pm, "David C" <dlch...@lifetimeinc.comwrote:
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"

Sep 24 '07 #2
On Sep 24, 7:54 pm, Alexey Smirnov <alexey.smir...@gmail.comwrote:
On Sep 24, 7:23 pm, "David C" <dlch...@lifetimeinc.comwrote:
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"
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
Sep 24 '07 #3
Thank you. That worked perfect.

David
"Alexey Smirnov" <al************@gmail.comwrote in message
news:11*********************@50g2000hsm.googlegrou ps.com...
On Sep 24, 7:54 pm, Alexey Smirnov <alexey.smir...@gmail.comwrote:
>On Sep 24, 7:23 pm, "David C" <dlch...@lifetimeinc.comwrote:
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"

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


Sep 24 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Arg | last post by:
I posted this to alt.comp.lang.php last week and got no response so I am reposting it here today... I am trying to use the following script to allow users to download files with some of the file...
2
by: ketulp_baroda | last post by:
Hi I want to determine the content type of uploaded file. File was uploaded by using <input type=file>. How can I determine the content type?
0
by: Melanie Provost | last post by:
I have a C# web application that saves files to a database as a byte array and retrieves those files. When retrieving a file to display I have to specify a content type / MIME type. I am having a...
2
by: Tim | last post by:
Is there a way to get a files content-type withOUT using the HTTP header object (because this is a winForms app). Maybe using the filestream object somehow?
5
by: AC [MVP MCMS] | last post by:
Any pointers on how to (1) read a Base64 encoded string from a text file and (2) write it to a binary file? I have a ton of files that are being generated from a legacy system. Each file...
2
by: Jerry Sievers | last post by:
A bit OT as this could pertain to perl CGIs too, etc. I have a php script that is hit, takes a file ID as GET parameter... does various checks including matching PHPSESSID to make sure the user...
21
by: cman | last post by:
does anyone know why i can't generate images with: header("Content-type:image/jpeg"); imagejpeg($img_number); i've tried different examples but i always get a text output as if the header...
4
by: shypen42 | last post by:
Hi, I'd like to know how to serve web pages as "cleanly" as possible, maybe validating them if it's possible. How should I do to both respect standards *and* have it work under the various IE...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.