Exemplo n.º 1
0
		public string[] GetDomainAliases(string domainName)
		{
			try
			{
				svcDomainAliasAdmin aliases = new svcDomainAliasAdmin();
				PrepareProxy(aliases);

				DomainAliasInfoListResult result = aliases.GetAliases(AdminUsername, AdminPassword, domainName);

				if (!result.Result)
					throw new Exception(result.Message);

				return result.DomainAliasNames;
			}
			catch (Exception ex)
			{
				throw new Exception("Could not get the list of mail domain aliases", ex);
			}
		}
Exemplo n.º 2
0
		public void DeleteDomainAlias(string domainName, string aliasName)
		{
			try
			{
				svcDomainAliasAdmin aliases = new svcDomainAliasAdmin();
				PrepareProxy(aliases);

				GenericResult result = aliases.DeleteDomainAlias(AdminUsername, AdminPassword,
					domainName, aliasName);

				if (!result.Result)
					throw new Exception(result.Message);
			}
			catch (Exception ex)
			{
				throw new Exception("Could not delete mail domain alias", ex);
			}
		}
Exemplo n.º 3
0
        public virtual void AddDomainAlias(string domainName, string aliasName)
        {
            try
            {
                svcDomainAliasAdmin aliases = new svcDomainAliasAdmin();
                PrepareProxy(aliases);

                GenericResult result = aliases.AddDomainAliasWithoutMxCheck(AdminUsername, AdminPassword,
                    domainName, aliasName);

                if (!result.Result)
                    throw new Exception(result.Message);
            }
            catch (Exception ex)
            {
                throw new Exception("Could not add mail domain alias", ex);
            }
        }