public static string[] GetCustomDomainTab(string customDomainName) { string[] result = new string[2]; XMLayer xm = XMServer.CreateXMLayer(); Hashtable ht = new Hashtable(); try { xm.Login(); string raw = xm.GetCustomDomainFile(customDomainName); string line; result[0] = ""; result[1] = ""; string[] id; using (StringReader sr = new StringReader(raw)) { while ((line = sr.ReadLine()) != null) { line = line.Trim(); if (line == ".") { break; } id = extractCustomDomainData(line); line = line.Trim(); switch (id[0]) { case "mailbox": case "redirect": case "lredirect": result[0] += line + "\r\n"; break; default: result[1] += line + "\r\n"; break; } } } } catch (Exception error) { Log.WriteException(error); throw; } finally { xm.Logout(); } return(result); }