title: OpenPop.net get actual message text
body: <p>I am using OpenPop.net to try and parse our links from all the emails that are in a given inbox. I found this method to get all the message:</p>
  
  <pre><code>    public static List&lt;OpenPop.Mime.Message&gt; FetchAllMessages(string hostname, int port, bool useSsl, string username, string password)
      {
          // The client disconnects from the server when being disposed
          using (Pop3Client client = new Pop3Client())
          {
              // Connect to the server
              client.Connect(hostname, port, useSsl);
  
              // Authenticate ourselves towards the server
              client.Authenticate(username, password);
  
              // Get the number of messages in the inbox
              int messageCount = client.GetMessageCount();
  
              // We want to download all messages
              List&lt;OpenPop.Mime.Message&gt; allMessages = new List&lt;OpenPop.Mime.Message&gt;(messageCount);
  
              // Messages are numbered in the interval: [1, messageCount]
              // Ergo: message numbers are 1-based.
              // Most servers give the latest message the highest number
              for (int i = messageCount; i &gt; 0; i--)
              {
                  allMessages.Add(client.GetMessage(i));                    
              }
  
              client.Disconnect();
  
              // Now return the fetched messages
              return allMessages;
          }
      }
  </code></pre>
  
  <p>Now I am trying to loop through each message but I cannot seem to figure out how to do it, I have this so far for my button:</p>
  
  <pre><code>    private void button7_Click(object sender, EventArgs e)
      {
  
          List&lt;OpenPop.Mime.Message&gt; allaEmail = FetchAllMessages("pop3.live.com", 995, true, "xxxxx@hotmail.com", "xxxxx");
  
          var message = string.Join(",", allaEmail);
          MessageBox.Show(message);
      }
  </code></pre>
  
  <p>How would i loop through each entry in allaEmail so that i can display it in a MessageBox?</p>