【问题标题】:Exchange Meeting Forward Notification: How to retrieve original meeting?Exchange 会议转发通知:如何检索原始会议?
【发布时间】:2020-06-13 22:29:46
【问题描述】:

我已经搜索了一周的信息,但没有取得任何实质性的成功。

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

(使用 C# 和 Microsoft 的 EWS 客户端 API)

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

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

转发通知示例:

附加到电子邮件的 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
    <MicrosoftExchange32----@----.onmicrosoft.com>
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】:

    应该在通知上设置 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("attendee@domain.com");
    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,"attendee@domain.com"));
    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
    }

    【讨论】:

      猜你喜欢
      • 2019-03-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-02
      • 2020-08-03
      • 2014-08-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多