public void DeleteGroup(string groupName) { try { svcAliasAdmin svcGroups = new svcAliasAdmin(); PrepareProxy(svcGroups); GenericResult result = svcGroups.DeleteAlias(AdminUsername, AdminPassword, GetDomainName(groupName), groupName); if (!result.Result) throw new Exception(result.Message); } catch (Exception ex) { throw new Exception("Could not delete mail domain group", ex); } }
public void DeleteMailAlias(string mailAliasName) { try { svcAliasAdmin aliases = new svcAliasAdmin(); PrepareProxy(aliases); GenericResult result = aliases.DeleteAlias(AdminUsername, AdminPassword, GetDomainName(mailAliasName), mailAliasName); if (!result.Result) throw new Exception(result.Message); } catch (Exception ex) { throw new Exception("Could not delete mailAlias", ex); } }