I am evaluating Aspose.Email File version 4.8.0 and attempting to use Pop3Client.ListMessages and getting a failure:
===================================================================
Aspose.Email.Pop3.Pop3Exception was caught
HResult=-2146233088
Message=The server returned an invalid response to the TOP command.
Source=Aspose.Email
StackTrace:
at . . ( [] )
at . .Send( , String , Int32 )
at . . (Int32 , Int32 )
at . . (Pop3ListFields )
at Aspose.Email.Pop3.Pop3Client.ListMessages(Boolean closeTransaction)
at Aspose.Email.Pop3.Pop3Client.ListMessages()
at Pop3Test.Program.Main(String[] args) in c:\Users\thayes\Documents\Visual Studio 2012\Projects\Tests\Pop3Test\Pop3Test\Program.cs:line 28
InnerException: System.NullReferenceException
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=Aspose.Email
StackTrace:
at Aspose.Email.Mail.AlternateView.CreateAlternateViewFromString(String , Encoding , ContentType , TransferEncoding )
at Aspose.Email.Mail.AlternateView.CreateAlternateViewFromString(String content, ContentType contentType)
at Aspose.Email.Mail.MailMessage. ( , Boolean , AlternateView )
at Aspose.Email.Mail.MailMessage. ( , Boolean , AlternateView )
at Aspose.Email.Mail.MailMessage. ( )
at Aspose.Email.Mail.MailMessage. ( )
at Aspose.Email.Mail.MailMessage. ( , Boolean )
at Aspose.Email.Mail.MailMessage…ctor( , Boolean , Boolean )
at Aspose.Email.Mail.MailMessage. (Stream , MailMessageLoadOptions )
at Aspose.Email.Mail.MailMessage.Load(Stream stream, MailMessageLoadOptions options)
at Aspose.Email.Mail.MailMessage.Load(Stream stream)
at . . ( [] )
InnerException:
{“Object reference not set to an instance of an object.”}
We are trying to connect to gmail pop3 port 995, [pop.gmail.com ](http://pop.gmail.com/)
.
Here is a snippet
var client = new Aspose.Email.Pop3.Pop3Client(“[pop.gmail.com ](http://pop.gmail.com/)”, 995);
client.SecurityOptions = SecurityOptions.SSLImplicit;
client.Timeout = 60000;
client.Connect(true);
var mailQuery = messageQueryBuilder.To.Contains(emailAddress);
client.ListMessages(mailQuery);
The emailAddress and password are withheld for security reasons. Thanks in advance.