Exchange会议转发通知:如何检索原始会议?

问题描述 投票:0回答:1

我一直在寻找这些信息一个星期,没有取得任何成功。

我的目标是Exchange 2010_SP2服务器,并且有一个应用程序使用EWS发送约会(会议)并邀请用户/与会者。当前,当一个用户将其日历项目转发给另一个用户时,Exchange会向我的应用程序的电子邮件地址发送有关该转发的自动通知。从通知消息中包含的信息中,我找不到任何信息可以帮助我明确绑定到原始约会。我确实对转发它的用户有一些线索,事件的标题以及它的日期/时间,但是没有任何东西可以保证是唯一的。我当时以为可以在主题中嵌入一个唯一的标识符,但这似乎有点毛病。还有其他人想出一种在上下文中查找事件的方法吗?

(使用C#和Microsoft的EWS Client API)

case EmailMessage fw when fw.ItemClass == "IPM.Schedule.Meeting.Notification.Forward":
    EmailMessage message = EmailMessage.Bind(Global.Exchange, fw.Id);
    message.Load();

[我试图尝试查询对话,尝试将客户X参数附加到原始会议,并检查了我可以在EmailMessage对象中想到的所有属性。

转发通知的示例:Example of a forward notification

电子邮件的Internet标头:(某些部分使用----删除)

Received: from FMSEDG002.ED.cps.----.com (10.1.192.134) by
 fmsmsx121.amr.corp.----.com (10.18.125.36) with Microsoft SMTP Server (TLS)
 id 14.3.439.0; Sat, 13 Jun 2020 14:24:33 -0700
Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.54) by
 edgegateway.----.com (192.55.55.69) with Microsoft SMTP Server (TLS) id
 14.3.439.0; Sat, 13 Jun 2020 14:24:33 -0700
Received: from BYAPR11MB3830.namprd11.prod.outlook.com (2603:10b6:a03:fc::14)
 by BYAPR11MB3797.namprd11.prod.outlook.com (2603:10b6:a03:fe::27) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.22; Sat, 13 Jun
 2020 21:24:30 +0000
Received: from BYAPR11MB3830.namprd11.prod.outlook.com
 ([fe80::9d21:2f25:9b76:e341]) by BYAPR11MB3830.namprd11.prod.outlook.com
 ([fe80::9d21:2f25:9b76:e341%7]) with mapi id 15.20.3088.027; Sat, 13 Jun 2020
 21:24:30 +0000
Content-Type: multipart/mixed;
    boundary="_000_BYAPR11MB383088E85E5BF51D212384F4F99E0BYAPR11MB3830namp_"
From: ----
To: ----
Subject: Meeting Forward Notification: Dummy Event - Example 3
Thread-Topic: Meeting Forward Notification: Dummy Event - Example
 3
Sender: Microsoft Outlook
    <[email protected]>
Date: Sat, 13 Jun 2020 21:24:30 +0000
Message-ID: <BYAPR11MB383088E85E5BF51D212384F4F99E0@BYAPR11MB3830.namprd11.prod.outlook.com>
X-MS-Has-Attach:
X-MS-TNEF-Correlator: <BYAPR11MB383088E85E5BF51D212384F4F99E0@BYAPR11MB3830.namprd11.prod.outlook.com>
authentication-results: ----; dkim=none (message not signed)
 header.d=none;----; dmarc=none action=none header.from=----;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 53ede74f-9111-4b3f-01ff-08d80fe028c7
x-ms-traffictypediagnostic: BYAPR11MB3797:
x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr
x-ms-oob-tlc-oobclassifiers: OLM:2089;
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: bevNkvUhwfDB1JTruSgvhewEnlseaRPl5vEl4tx04MJVY/bY7tbeShWgjWHsg2ZEGmWH2ZZN2rjA4NjqI9seC5ei1B9A0m8tvCr7Ij+3IJAUr8vYz0F7LRwVKE2nZB1E7Wy7V3pHvYxyT6tyOvjbxDeHN7Fbs0dvKYwj4g/EWxAEiXNmGFxkPXGowV3I1v2vWT+hBIIO6Sz1Lg8/jzPm7l6d9DZZ7gxjQDQfuAcBgQEUj46RqNlMosWGEK65oBHWTYRC4R2oc3z2qS3Y8VgIzg==
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:-1;SRV:;IPV:NLI;SFV:SKI;H:BYAPR11MB3830.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:INB;SFP:;
x-ms-exchange-transport-forked: True
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 53ede74f-9111-4b3f-01ff-08d80fe028c7
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jun 2020 21:24:30.0788
 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3797
X-OrganizationHeadersPreserved: BYAPR11MB3797.namprd11.prod.outlook.com
Return-Path: <>
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 04
X-MS-Exchange-Organization-AuthSource: BYAPR11MB3830.namprd11.prod.outlook.com
X-CrossPremisesHeadersPromoted: ----
X-CrossPremisesHeadersFiltered: ----
X-MS-Exchange-Organization-SCL: -1
X-OriginatorOrg: intel.onmicrosoft.com
X-MS-Exchange-Organization-AVStamp-Mailbox: NAI;60104903;0;novirus
c# email exchange-server exchangewebservices exchange-server-2010
1个回答
0
投票

应该在通知上设置扩展的PidLidCleanGlobalObjectId http://msdn.microsoft.com/en-us/library/cc839502.aspx。您可以使用它来搜索约会,例如,在使用该属性的示例中]

Appointment newAppointment = new Appointment(service);
newAppointment.Subject = "Test Subject";        
newAppointment.Start = new DateTime(2016, 08, 27, 17, 00, 0);
newAppointment.StartTimeZone = TimeZoneInfo.Local;
newAppointment.EndTimeZone = TimeZoneInfo.Local;
newAppointment.End = newAppointment.Start.AddMinutes(30);
newAppointment.Save();
newAppointment.Body = new MessageBody(Microsoft.Exchange.WebServices.Data.BodyType.Text, "test");
newAppointment.RequiredAttendees.Add("[email protected]");
newAppointment.Update(ConflictResolutionMode.AlwaysOverwrite ,SendInvitationsOrCancellationsMode.SendOnlyToAll);
ExtendedPropertyDefinition CleanGlobalObjectId = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Meeting, 0x23, MapiPropertyType.Binary);
PropertySet psPropSet = new PropertySet(BasePropertySet.FirstClassProperties);
psPropSet.Add(CleanGlobalObjectId);
newAppointment.Load(psPropSet);
object CalIdVal = null;
newAppointment.TryGetProperty(CleanGlobalObjectId, out CalIdVal);
Folder AtndCalendar = Folder.Bind(service, new FolderId(WellKnownFolderName.Calendar,"[email protected]"));
SearchFilter sfSearchFilter = new SearchFilter.IsEqualTo(CleanGlobalObjectId, Convert.ToBase64String((Byte[])CalIdVal));
ItemView ivItemView = new ItemView(1);
FindItemsResults<Item> fiResults = AtndCalendar.FindItems(sfSearchFilter, ivItemView);
if (fiResults.Items.Count > 0) {
    //do whatever
}
© www.soinside.com 2019 - 2024. All rights reserved.