Esempio n. 1
0
        private MailEnableEmailItem GetMailBox(string domainName, string accountName)
        {
            var mailbox = new MailEnableEmailItem();

            var _login = new Login();

            _login.Account             = domainName;
            _login.LastAttempt         = -1;
            _login.LastSuccessfulLogin = -1;
            _login.Password            = "";
            _login.Rights   = "";
            _login.Status   = -1;
            _login.UserName = String.Format("{0}@{1}", accountName, domainName);
            _login.GetLogin();

            var _mbox = new Mailbox();

            _mbox.Postoffice  = domainName;
            _mbox.MailboxName = accountName;

            mailbox.Password     = _login.Password;
            mailbox.MailBoxQuota = (_mbox.GetQuota() / 1024);

            if (mailbox.MailBoxQuota == 0)
            {
                mailbox.MailBoxQuota = -1;
            }

            return(mailbox);
        }
Esempio n. 2
0
        private MailEnableEmailItem GetMailBox(string domainName, string accountName)
        {
            var mailbox = new MailEnableEmailItem();

            var _login = new Login();
            _login.Account = domainName;
            _login.LastAttempt = -1;
            _login.LastSuccessfulLogin = -1;
            _login.Password = "";
            _login.Rights = "";
            _login.Status = -1;
            _login.UserName = String.Format("{0}@{1}",accountName, domainName);
            _login.GetLogin();

            var _mbox = new Mailbox();
            _mbox.Postoffice = domainName;
            _mbox.MailboxName = accountName;

            mailbox.Password = _login.Password;
            mailbox.MailBoxQuota = (_mbox.GetQuota() / 1024);

            if (mailbox.MailBoxQuota == 0)
                mailbox.MailBoxQuota = -1;

            return mailbox;
        }