Exemplo n.º 1
0
        private string ReceiveMultiLineResponse()
        {
            string cursor   = EmailStreamReader.ReadLine();
            string response = string.Empty;

            while (cursor != ".")
            {
                response += cursor + '\n';
                cursor    = EmailStreamReader.ReadLine();
            }
            return(response);
        }
Exemplo n.º 2
0
        protected override void ReceiveResponse()
        {
            string response = string.Empty;

            if (!IsMultiLineResponse)
            {
                response = EmailStreamReader.ReadLine();
            }
            else
            {
                response = ReceiveMultiLineResponse();
            }
            Response = response;
        }
Exemplo n.º 3
0
        protected override void ReceiveResponse()
        {
            bool   isEnd    = false;
            string response = string.Empty;
            string cursor   = string.Empty;

            while (!isEnd)
            {
                cursor    = EmailStreamReader.ReadLine();
                response += cursor + "\n";
                if (cursor.StartsWith(IMAP_PREFIX + "OK") || cursor.StartsWith(IMAP_PREFIX + "NO") ||
                    cursor.StartsWith(IMAP_PREFIX + "BAD"))
                {
                    isEnd = true;
                }
            }

            Response = response;
        }