Joshi.Utils.Imap.Imap.HasEnoughQuota C# (CSharp) Method

HasEnoughQuota() public method

Check if enough quota is available
public HasEnoughQuota ( string sFolderName ) : bool
sFolderName string Mailbox folder
return bool
        public bool HasEnoughQuota(string sFolderName)
        {
            try
            {
                bool bUnlimitedQuota = false;;
                int nUsedKBytes = 0;
                int nTotalKBytes = 0;

                GetQuota(sFolderName, ref bUnlimitedQuota,
                    ref nUsedKBytes, ref nTotalKBytes);

                if (bUnlimitedQuota || (nUsedKBytes < nTotalKBytes))
                    return true;
                else
                    return false;
            }
            catch (ImapException e)
            {
                throw e;
            }
        }