托管 EWS - 使用来自酒店的替代选项回复帖子

发布于 2024-10-04 00:36:56 字数 1142 浏览 0 评论 0原文

在托管 Exchange Web 服务中,有一个类 PostItem,可以使用 ExchangeService 对象实例化。

但是在分配包括 InReplyId 和 From 在内的所有属性并调用 Save(folderId) 方法之后:

        PostItem newPost = new PostItem(mService);
        newPost.InReplyTo = originalPost.Id.UniqueId;
        newPost.From = new EmailAddress( "Max Gontar", "[email protected]" );
        newPost.Subject = msg.Subj;
        newPost.Body = msg.TextBody;
        newPost.Save(mCurrentFolderId);

它仍然创建一个单独的帖子,而不是回复帖子:

我尝试过的其他方式:

        PostReply reply = originalPost.CreatePostReply();
        reply.Subject = msg.Subj;
        reply.Body = msg.TextBody;
        reply.Save( currentFolder.Id )

无法设置来自属性,因此它应该使用当前凭据联系人电子邮件地址创建帖子回复。 但是它给出了 null!

alt text

你能帮助我吗?

谢谢你!

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", "[email protected]" );
        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!

alt text

Can you help me?

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

未蓝澄海的烟 2024-10-11 00:36:56

我刚刚学习这个 api,但这段代码可能有效:

 newpost.Update(ConflictResolutionMode.AutoResolve)

Im just learning about this api but this code may work:

 newpost.Update(ConflictResolutionMode.AutoResolve)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文