Greetings lower the stable latest version of Aspose mail 16.10.1,
and had to go back to version 6.6.0.0 this has many problems,
but at least let me all messages in the inbox I'm reading.
This is the code I'm running and attached the error message I get.
I'm using .net framework 4.6.1
public ImapMessageInfoCollection GetFilterMessages(int takeQuantityMessages)
{
ImapMessageInfoCollection imapMessageInfoCollection = null;
try
{
using (ImapClient client = new ImapClient(mailHost, imapPort, mailAccount, mailPassword))
{
ServicePointManager.ServerCertificateValidationCallback = delegate (object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; };
client.SelectFolder(ImapFolderInfo.InBox);
imapMessageInfoCollection = client.ListMessagesByPage(takeQuantityMessages).Items;
}
}
catch (Exception ex)
{
log.Error("Error loading mail from the server", ex);
}
return imapMessageInfoCollection;
}
Hi Jose,