Exchange EWS获得密件抄送收件人

编程入门 行业动态 更新时间:2024-10-09 02:24:06
本文介绍了Exchange EWS获得密件抄送收件人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用EWS在收件箱上创建 StreamingSubscription .它正在监听 NewMail 事件.我可以提取发件人地址,主题,正文,收件人地址,抄送地址,但不能提取密件抄送地址.有什么办法查看此列表吗?

I am using EWS to create a StreamingSubscription on an inbox. It is listening for the NewMail event. I am able to pull the From Address, Subject, Body, To Address, CC Address but not the BCC Address. Is there any way to see this list?

代码:

static void OnEvent(object sender, NotificationEventArgs args) { String from = null; String subject = null; String body = null; String to = null; StreamingSubscription subscription = args.Subscription; // Loop Through All Item-Related Events foreach (NotificationEvent notification in args.Events) { ItemEvent item = (ItemEvent)notification; PropertySet propertySet = new PropertySet(ItemSchema.UniqueBody); propertySet.RequestedBodyType = BodyType.Text; propertySet.BasePropertySet = BasePropertySet.FirstClassProperties; // Parse Email EmailMessage message = EmailMessage.Bind(service, item.ItemId, propertySet); from = message.From.Address; subject = message.Subject; body = message.Body.Text; if (message.ToRecipients.Count > 0) { to = message.ToRecipients[0].Address; body += "\n TO FIELD"; } else if (message.CcRecipients.Count > 0) { to = message.CcRecipients[0].Address; body += "\n CC FIELD"; } /************** Does not work! BccRecipients is always empty *****************/ else if (message.BccRecipients.Count > 0) { to = message.BccRecipients[0].Address; body += "\n BCC FIELD"; } /************* REST OF CODE ************************/ } }

推荐答案

那会打败盲目抄写的目的.我不相信可以做到.

That would kind of defeat the point of a blind-carbon-copy. I dont believe it can be done.

更多推荐

Exchange EWS获得密件抄送收件人

本文发布于:2023-05-31 13:58:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/393007.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:密件   收件人   Exchange   EWS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!