Managed EWS - Reply Post with alternative From property
In managed Exchange Web Services there is a class PostItem, which can be instantiate with ExchangeService object.
But after assigning all properties including with InReplyId and From, and calling Save(folderId) method:
PostItem newPost = new PostItem(mService);
newPost.InReplyTo = originalPost.Id.UniqueId;
newPost.From = new EmailAddress( "Max Gontar", "mgontar@server.com" );
newPost.Subject = msg.Subj;
newPost.Body = msg.TextBody;
newPost.Save(mCurrentFolderId);
It still creates a separate Post, not a Reply Post:
Other way I have tried:
PostReply reply = originalPost.CreatePostReply();
reply.Subject = msg.Subj;
reply.Body = msg.TextBody;
reply.Save( currentFolder.Id )
There is no way to set From property,开发者_运维百科 so it should create Post Reply with current credentials Contact email address. But it gives null there!
Can you help me?
Thank you!
Im just learning about this api but this code may work:
newpost.Update(ConflictResolutionMode.AutoResolve)
精彩评论