OpenPop.Net - The server did not respond
<p>I am using OpenPop.NET and I am trying to download the emails from the server. But, it is giving the below error message In the meantime, I could configure and download the mails without any issues in Outlook by using the same settings that I did with OpenPop.NET.</p>

<p>The server did not respond with a + response. The response was: "-ERR Command is not valid in this state."</p>

<pre><code>FetchAllMessages(smtpserver, 110, false, emailId, password);


public static List&lt;Message&gt; FetchAllMessages(string hostname, int port, bool useSsl, string username, string password)
    {
        using (Pop3Client client = new Pop3Client())
        {
            client.Connect(hostname, port, useSsl);

            client.Authenticate(username, password);

            int messageCount = client.GetMessageCount();

            List&lt;Message&gt; allMessages = new List&lt;Message&gt;(messageCount);

            for (int i = messageCount; i &gt; 0; i--)
            {
                allMessages.Add(client.GetMessage(i));
            }

            return allMessages;
        }
    }
</code></pre>

<p>throwing exception in client.Authenticate(username, password);</p>
