예제 #1
0
 public POP3Item(MailMessage msg)
 {
     this.From = msg.From;
     this.To = msg.To;
     this.Subject = msg.Subject;
     this.Body = msg.Body;
 }
예제 #2
0
파일: Pop3Client.cs 프로젝트: fizikci/Cinar
        public MailMessage ReadAsMailMessage()
        {
            MailMessage msg = new MailMessage();
            msg.Body = Body;
            msg.Subject = Subject;
            msg.From = From;
            msg.To = To;

            if (IsMultipart)
            {
                msg.Attachments = new List<Pop3Component>();
                IEnumerator enumerator = MultipartEnumerator;
                while (enumerator.MoveNext())
                {
                    Pop3Component multipart = (Pop3Component)enumerator.Current;
                    if (multipart.IsBody)
                        msg.Body = multipart.Data;
                    else
                        msg.Attachments.Add(multipart);
                }
            }

            return msg;
        }