c# - Email Message save to Local Folder through EWS -
I am using this method to save email messages locally and if there is an attachment with email, then it works fine.
_emailMessage.Load (new propertySat (methicemma. Mimecontent)); MimeContent MC = _emailMessage.MimeContent; Var path = path Combine (diffulpath, email mjnem); File stream fs = new filestream (path, create file mode); Fs.Write (mc.Content, 0, mc.Content.Length); Fs.Close (); If there is no attachment, it throws an exception and is not able to save the email message to the folder. There is an exception "This operation can not be performed because this service object has no ID."
Please tell me how to deal with this problem.
Thanks
Perhaps some code path does not use email messages. Save or email message. Weight
Comments
Post a Comment