Beispiel #1
0
        public FullServerData GetMailServerFullInfo()
        {
            var full_server_info = new FullServerData();
            var mailboxes        = new List <MailboxData>();
            var mailgroups       = new List <MailGroupData>();

            var server  = GetMailServer();
            var domains = GetDomains();

            if (domains.Any())
            {
                mailboxes = GetMailboxes();

                if (mailboxes.Any())
                {
                    mailgroups = GetMailGroups();
                }
            }

            full_server_info.Server     = server;
            full_server_info.Domains    = domains;
            full_server_info.Mailboxes  = mailboxes;
            full_server_info.Mailgroups = mailgroups;

            return(full_server_info);
        }
Beispiel #2
0
        public FullServerData GetMailServerFullInfo()
        {
            if (!IsAdmin)
            {
                throw new SecurityException("Need admin privileges.");
            }

            var fullServerInfo = new FullServerData();
            var mailboxes      = new List <MailboxData>();
            var mailgroups     = new List <MailGroupData>();

            var server  = GetMailServer();
            var domains = GetDomains();

            if (domains.Any())
            {
                mailboxes = GetMailboxes();

                if (mailboxes.Any())
                {
                    mailgroups = GetMailGroups();
                }
            }

            fullServerInfo.Server     = server;
            fullServerInfo.Domains    = domains;
            fullServerInfo.Mailboxes  = mailboxes;
            fullServerInfo.Mailgroups = mailgroups;

            return(fullServerInfo);
        }