在Exchange传输代理中的e.MailItem.Message.CalendarPart中获取null [英] Getting null in e.MailItem.Message.CalendarPart in exchange transport agent

查看:105
本文介绍了在Exchange传输代理中的e.MailItem.Message.CalendarPart中获取null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Exchange 2013开发自定义传输代理.尽管我正在发送会议请求,但在e.MailItem.Message.CalendarPart中却显示了null.

I am developing a custom transport agent for Exchange 2013. I am getting null in e.MailItem.Message.CalendarPart though I am sending a meeting request.

   if (e.MailItem.Message.CalendarPart != null)
        {
            LocationProcessorStrategy.AddLocationInBody(e.MailItem.Message);
        }
        else
        {
            e.MailItem.Message.Subject += " [There is no calendar part - added by agent.]";
        }

e.MailItem.Message.MapiMessageClass给我值"IPM.Schedule.Meeting.Request",但CalendarPart为空.

推荐答案

这通常意味着,在消息传递"阶段,您尝试截取该消息时,没有要分析的ICal Body部分. iCal通常根据收件人类型 https来创建帖子分类://technet.microsoft.com/zh-CN/library/bb232174(v = exchg.150).aspx .因此,要么在分类发生后将您的代理推送到运行状态,要么使用TNEFReader/TNEFWriter解析TNEFStream以获得消息.请注意,由于所使用的格式,如果要同时处理内部和外部日历邀请",则可能需要两种解决方案.

That generally means that at the Messaging stage you trying to intercept the message there is no ICal Body part to parse. iCal is usually create post categorisation depending on the recipient type https://technet.microsoft.com/en-us/library/bb232174(v=exchg.150).aspx . So either push your Agent to run after categorisation has occurred or use the TNEFReader/TNEFWriter to parse the TNEFStream for the message. Note you may need two solution if you want process bother internal and external Calendar Invites because of the formats used.

这篇关于在Exchange传输代理中的e.MailItem.Message.CalendarPart中获取null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆