// Создание письма с заголовком public MyMailMessage(string header) : base() { Headers.Add("main", header.Substring(header.IndexOf("\r\n") + 2)); num = Convert.ToInt32(ParserMessage.FirstFromTo(header, " ", " ")); id = ParserMessage.GetID(header); Sender = From = ParserMessage.GetFrom(header); MailAddressCollection temp = ParserMessage.GetTo(header); foreach (MailAddress adr in temp) { To.Add(adr); } Subject = ParserMessage.GetSubject(header); temp = ParserMessage.GetReply(header); foreach (MailAddress adr in temp) { ReplyToList.Add(adr); } temp = ParserMessage.GetCC(header); foreach (MailAddress adr in temp) { CC.Add(adr); } temp = ParserMessage.GetBcc(header); foreach (MailAddress adr in temp) { Bcc.Add(adr); } date = ParserMessage.GetDate(header); displayDate = new DateString(date); mainContentType = ParserMessage.GetContentType(header); BodyEncoding = ParserMessage.MyGetEncoding(mainContentType.CharSet); BodyTransferEncoding = ParserMessage.GetBodyTransfer(header); isHaveAttachments = (mainContentType.MediaType == "multipart/mixed" || mainContentType.MediaType == "multipart/related"); IsBodyHtml = (mainContentType.MediaType == MediaTypeNames.Text.Html); myAttachments = new List <MyAttachment>(); }