c# - EWS save/export EmailMessage in other format -


i'm working ews managed api 2.0. @ moment can save emailmessages harddrive *.eml files. can't open them correctly show content.

how can emailmessage (.eml) saved .html, .doc or .txt file directly?

use following code if want save .eml

message.load(new propertyset(itemschema.mimecontent)); mimecontent mimcon = message.mimecontent; filestream fstream = new filestream("c:\test.eml", filemode.create); fstream.write(mimcon.content, 0, mimcon.content.length); fstream.close(); 

for msg file @ following link:

http://msdn.microsoft.com/en-us/library/cc463912%28exchg.80%29.aspx

after saving .eml file can @ following post parsing it:

recommendations on parsing .eml files in c#

hope helpful.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -