diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs index 2880d4f5..ab2ed217 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs @@ -1123,8 +1123,10 @@ namespace WebsitePanel.EnterpriseServer if (!string.IsNullOrEmpty(org.GlobalAddressList)) { ExchangeServerController.AddAuthoritativeDomain(itemId, domain.DomainId); - - if (orgStats.AllocatedMailboxes == -1) + + OrganizationStatistics orgStatsExchange = ExchangeServerController.GetOrganizationStatistics(itemId); + + if (orgStatsExchange.AllocatedMailboxes == -1) { ExchangeAcceptedDomainType newDomainType = ExchangeAcceptedDomainType.InternalRelay; ChangeOrganizationDomainType(itemId, domain.DomainId, newDomainType);