// Token: 0x0600206D RID: 8301 RVA: 0x00078A6C File Offset: 0x00076C6C internal static bool AddOtherMailboxConfig(CallContext callContext, string displayName, string primarySMTPAddress) { if (string.IsNullOrWhiteSpace(primarySMTPAddress)) { return(false); } UserContext userContext = UserContextManager.GetUserContext(callContext.HttpContext, callContext.EffectiveCaller, true); if (userContext.IsExplicitLogon) { throw new OwaInvalidRequestException("Cannot open other's folder in explict logon mode"); } SmtpAddress smtpAddress = SmtpAddress.Parse(primarySMTPAddress); IRecipientSession adrecipientSession = CallContext.Current.ADRecipientSessionContext.GetADRecipientSession(); ADRecipient adrecipient = adrecipientSession.FindByProxyAddress(ProxyAddress.Parse(smtpAddress.ToString())); if (string.Equals(userContext.ExchangePrincipal.LegacyDn, adrecipient.LegacyExchangeDN, StringComparison.OrdinalIgnoreCase)) { throw new OwaInvalidOperationException("Cannot open own folder"); } SimpleConfiguration <OtherMailboxConfigEntry> otherMailboxConfig = OwaOtherMailboxConfiguration.GetOtherMailboxConfig(CallContext.Current); if (OwaOtherMailboxConfiguration.FindOtherMailboxConfigEntry(otherMailboxConfig, primarySMTPAddress) == null) { OtherMailboxConfigEntry otherMailboxConfigEntry = new OtherMailboxConfigEntry(); otherMailboxConfigEntry.DisplayName = displayName; otherMailboxConfigEntry.PrincipalSMTPAddress = primarySMTPAddress; otherMailboxConfig.Entries.Add(otherMailboxConfigEntry); otherMailboxConfig.Save(CallContext.Current); } return(true); }
// Token: 0x0600206E RID: 8302 RVA: 0x00078B4C File Offset: 0x00076D4C internal static bool RemoveOtherMailboxConfig(CallContext callContext, string primarySMTPAddress) { if (string.IsNullOrWhiteSpace(primarySMTPAddress)) { return(false); } SimpleConfiguration <OtherMailboxConfigEntry> otherMailboxConfig = OwaOtherMailboxConfiguration.GetOtherMailboxConfig(CallContext.Current); OtherMailboxConfigEntry otherMailboxConfigEntry = OwaOtherMailboxConfiguration.FindOtherMailboxConfigEntry(otherMailboxConfig, primarySMTPAddress); if (otherMailboxConfigEntry != null) { otherMailboxConfig.Entries.Remove(otherMailboxConfigEntry); otherMailboxConfig.Save(CallContext.Current); } return(true); }
// Token: 0x06002070 RID: 8304 RVA: 0x00078BB8 File Offset: 0x00076DB8 internal void LoadAll(CallContext callContext) { SimpleConfiguration <OtherMailboxConfigEntry> otherMailboxConfig = OwaOtherMailboxConfiguration.GetOtherMailboxConfig(callContext); this.PopulateConfigEntries(otherMailboxConfig.Entries); }