#region 创建邮箱 public void CreateEmail(DirectoryEntry de, string username, string duty, string account) { ADClass.CDuty cduty = new ADClass.CDuty(); //判断是否是SH开头的 if (account.Substring(0, 2).ToUpper() == "SH") { DataTable dt = cduty.DutyByDutyName(duty); if (dt != null && dt.Rows.Count > 0) { de.Properties["homeMDB"].Value = ywyMDB; de.Properties["homeMTA"].Value = MTA; de.Properties["mailNickname"].Value = account; de.Properties["msExchHomeServerName"].Value = msExchHomeServerName; de.Properties["legacyExchangeDN"].Value = legacyExchangeDN + account; de.CommitChanges(); } else { de.Properties["homeMDB"].Value = MDB; de.Properties["homeMTA"].Value = MTA; de.Properties["mailNickname"].Value = account; de.Properties["msExchHomeServerName"].Value = msExchHomeServerName; de.Properties["legacyExchangeDN"].Value = legacyExchangeDN + account; de.CommitChanges(); } } } #endregion
这个是我创建邮箱的代码 我直接在执行这个代码次更改邮箱存储组 邮件就没了
能不能实现exchange移动邮箱那样更改存储组啊
我用的exchange2003