我正在开发一个示例c#应用程序,该应用程序监控通过组织交换服务器的所有会议请求。我已经尝试使用EWS读取来自特定电子邮件地址的所有邮件,
MailServer oServer = new MailServer("outlook.office365.com",
"test@emailarchitect.net", "testpassword", ServerProtocol.ExchangeEWS );
MailClient oClient = new MailClient("TryIt");
// If your POP3 server requires SSL connection,
// Please add the following codes:
// oServer.SSLConnection = true;
try
{
oClient.Connect(oServer);
MailInfo[] infos = oClient.GetMailInfos();
for (int i = 0; i < infos.Length; i++)
{
MailInfo info = infos[i];
Console.WriteLine("Index: {0}; Size: {1}; UIDL: {2}",
info.Index, info.Size, info.UIDL);
// Receive email from mail server
Mail oMail = oClient.GetMail(info);
Console.WriteLine("From: {0}", oMail.From.ToString());
Console.WriteLine("Subject: {0}\r\n", oMail.Subject);
}......但是上面的代码只从特定的邮件地址读取邮件。我需要读取通过特定组织交换服务器的所有会议请求(例如:表单contoso.com域)是否可以使用EWS,或者是否有任何其他可用的解决方案。
任何帮助都是非常感谢的。
发布于 2015-10-07 09:50:12
我建议您考虑使用传输代理https://msdn.microsoft.com/en-us/library/office/bb204097(v=exchg.150).aspx,当会议邀请在传输管道中时,传输代理将允许您处理它们。然后,您应该能够使用ical阅读器https://msdn.microsoft.com/en-us/library/office/microsoft.exchange.data.contenttypes.icalendar(v=exchg.150).aspx或使用TNEF阅读器解析消息上的TNEF属性。有一个示例icalendar代理http://blogs.technet.com/b/jasoning/archive/2011/08/17/icalendar-property-rewrite.aspx
干杯峡谷
https://stackoverflow.com/questions/32968262
复制相似问题