Application crash when connecting to pop3

Hi there,

I am having problems connecting to a pop3 server, here is how I create pop3 client

{
// Had check here for make sure ServerName is not empty
client = new Pop3Client(ServerName, Port, User, Password);
client.SecurityOptions = Aspose.Email.SecurityOptions.Auto;

try
{
messageCount = client.GetMessageCount();
}
catch (Exception error)
{
Logger.Log.Error("Error connecting to POP3 server. " + error.ToString());
}
}

then I got an error message in log

Error connecting to POP3 server. System.NullReferenceException: Object reference not set to an instance of an object.
at ??.?? ? (String , Int32 )
at ?. (Int32 )
at ?.?? ? ()
at Aspose.Email.Pop3.Pop3Client.GetMessageCount(IConnection iConnection, Boolean closeTransaction)
at GetPop3Client()

This code works in my dev and test environments, but it always throw this error in client’s environment, I can’t reproduce it, Could you have your dev to take a look what may cause the problem?

Hi,


Thank you posting your inquiry.

Could you please share with us the server details to which your client is connecting? Also, we are not able to reproduce the same at our end. Please ask your user to generate Pop3 Client Activity log and share with us once he faces the exception. We’ll look into it for assisting you further.