Exchange Shared and Resource mailboxes : Import.Enterprise fix

This commit is contained in:
dev_amdtel 2014-11-28 20:44:50 +04:00
parent 52a83bfa61
commit b3b60fd3d7

View file

@ -780,7 +780,24 @@ namespace WebsitePanel.Import.Enterprise
return userId;
}
int mailboxType = (int)type.Value;
PropertyValueCollection typeDetails = entry.Properties["msExchRecipientTypeDetails"];
int mailboxTypeDetails = 0;
if (typeDetails!=null)
{
if (typeDetails.Value != null)
mailboxTypeDetails = (int)typeDetails.Value;
}
ExchangeAccountType accountType = ExchangeAccountType.Undefined;
if (mailboxTypeDetails == 4)
{
Log.WriteInfo("Account type : shared mailbox");
accountType = ExchangeAccountType.SharedMailbox;
}
else
{
switch (mailboxType)
{
case 1073741824:
@ -798,6 +815,7 @@ namespace WebsitePanel.Import.Enterprise
default:
Log.WriteInfo("Account type : unknown");
return userId;
}
}
UpdateExchangeAccount(userId, accountName, accountType, displayName, email, false, string.Empty, samName, string.Empty);