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,