Пример #1
0
        /// <summary>
        /// get size of one particular email
        /// </summary>
        /// <param name="msg_number"></param>
        /// <returns></returns>
        public int GetUniqueEmailId(EmailUid msg_number)
        {
            EnsureState(Pop3ConnectionStateEnum.Connected);
            string response;

            executeCommand("LIST " + msg_number.ToString(), out response);
            int EmailSize = 0;

            string[] responseSplit = response.Split(' ');
            if (responseSplit.Length < 2 || !int.TryParse(responseSplit[2], out EmailSize))
            {
                CallWarning("GetEmailSize", response, "'+OK int int' format expected (EmailId, EmailSize)");
            }

            return(EmailSize);
        }
Пример #2
0
        /// <summary>
        /// get size of one particular email
        /// </summary>
        /// <param name="msg_number"></param>
        /// <returns></returns>
        public int GetUniqueEmailId(EmailUid msg_number)
        {
            EnsureState(Pop3ConnectionStateEnum.Connected);
              string response;
              executeCommand("LIST " + msg_number.ToString(), out response);
              int EmailSize = 0;
              string[] responseSplit = response.Split(' ');
              if (responseSplit.Length<2 || !int.TryParse(responseSplit[2], out EmailSize)) {
            CallWarning("GetEmailSize", response, "'+OK int int' format expected (EmailId, EmailSize)");
              }

              return EmailSize;
        }