コード例 #1
0
 public Pop3Message(long position, long size, Socket client)
 {
     this.m_inboxPosition = position;
     this.m_messageSize = size;
     this.m_client = client;
     this.m_pop3State = new Pop3StateObject();
     this.m_pop3State.workSocket = this.m_client;
     this.m_pop3State.sb = new StringBuilder();
     this.LoadEmail();
     IEnumerator multipartEnumerator = this.MultipartEnumerator;
     while (multipartEnumerator.MoveNext())
     {
         Pop3Component current = (Pop3Component) multipartEnumerator.Current;
         if (current.IsBody)
         {
             this.m_body = current.Data;
             break;
         }
     }
 }
コード例 #2
0
 private void LoadEmail()
 {
     this.Send("retr " + this.m_inboxPosition);
     this.StartReceive();
     this.ParseEmail(this.m_pop3State.sb.ToString().Split(new char[] { '\r' }));
     this.m_pop3State = null;
 }