Check below link for more info.
public static List<Message> 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<Message> allMessages = new List<Message>(messageCount);
for (int i = messageCount; i > 0; i--)
{
allMessages.Add(client.GetMessage(i));
}
return allMessages;
}
}
Download all email from server