private ArticleBody GetNormalBody(string messageId) { char[] buff = new char[1]; string response = null; ArrayList list = new ArrayList(); StringBuilder sb = new StringBuilder(); Attachment attach = null; MemoryStream ms = null; sr.Read(buff, 0, 1); int i = 0; byte[] bytes = null; Match m = null; while ((response = sr.ReadLine()) != null) { if (buff[0] == '.') { if (response == "") { break; } else { sb.Append(response); } } else { if ((buff[0] == 'B' || buff[0] == 'b') && (m = Regex.Match(response, @"^EGIN \d\d\d (.+)$", RegexOptions.IgnoreCase)).Success) { ms = new MemoryStream(); while ((response = sr.ReadLine()) != null && (response.Length != 3 || response.ToUpper() != "END")) { NntpUtil.UUDecode(response, ms); } ms.Seek(0, SeekOrigin.Begin); bytes = new byte[ms.Length]; ms.Read(bytes, 0, (int)ms.Length); attach = new Attachment(messageId + " - " + m.Groups[1].ToString(), m.Groups[1].ToString(), bytes); list.Add(attach); ms.Close(); i++; } else { sb.Append(buff[0]); sb.Append(response); } } sb.Append('\n'); sr.Read(buff, 0, 1); } ArticleBody ab = new ArticleBody(); ab.IsHtml = false; ab.Text = sb.ToString(); ab.Attachments = (Attachment[])list.ToArray(typeof(Attachment)); return(ab); }