我运行此代码,但它在我的 Office 365 Exchange 中没有执行任何操作,它没有将收件箱或收到的电子邮件发送给模拟用户。它没有给我任何错误。有人可以帮我吗?或者知道为什么此代码不适用于我的 Office 365 交换?
List<DelegateUser> newAllDelegates = new System.Collections.Generic.List<DelegateUser>();
DelegateUser AllDelegate = new DelegateUser(ImpersonatedEmail);
AllDelegate.Permissions.CalendarFolderPermissionLevel = DelegateFolderPermissionLevel.Editor;
AllDelegate.Permissions.InboxFolderPermissionLevel = DelegateFolderPermissionLevel.Editor;
AllDelegate.Permissions.TasksFolderPermissionLevel = DelegateFolderPermissionLevel.Editor;
AllDelegate.Permissions.ContactsFolderPermissionLevel = DelegateFolderPermissionLevel.Editor;
AllDelegate.Permissions.NotesFolderPermissionLevel = DelegateFolderPermissionLevel.Editor;
AllDelegate.Permissions.JournalFolderPermissionLevel = DelegateFolderPermissionLevel.Editor;
newAllDelegates.Add(AllDelegate);
Mailbox mbxPermitted = new Mailbox(_uid);
Collection<DelegateUserResponse> delReturn = service.AddDelegates(mbxPermitted, MeetingRequestsDeliveryScope.DelegatesAndSendInformationToMe, newAllDelegates);
System.Windows.Forms.MessageBox.Show("Editor Permission on All to " + ImpersonatedEmail + " On the Mailbox " + _uid + " Added.", "O365 Delegates: Success!");