Link to home
Create AccountLog in
Avatar of rajathi_franco
rajathi_francoFlag for United States of America

asked on

create outlook msg file

hi,

Is it possible to create an outlook .msg file programmatically using asp.net c#?

we tried to create this .msg file in our .net application and force download the .msg file using the below code

Response.Clear();
Response.ContentType = "application/vnd.ms-outlook";
Response.AddHeader("Content-Disposition", "attachment; filename=myfile.msg");
Response.BinaryWrite(myMemoryStream.ToArray());
Response.Flush();
Response.Close();
Response.End();

But it was not working fine, any suggestions?
Avatar of Meir Rivkin
Meir Rivkin
Flag of Israel image

Avatar of rajathi_franco

ASKER

Hi,

Thank you for looking into this query.

The above question is related to contenttype. When downloading msg file, instead of directly opening outlook, our application prompted error as "The command line argument is not valid, verify the switch you are using...".

Can you please help here to know how to create binary formatted unicode msg file through our .net application or do i need to change contenttype?
Hi, do you mean to say, there are no options in in-built .net components and we need to buy third party components for this functionality?
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer