It appears that the Imap client is not freeing the underlying socket connection when the client is disconnected and disposed. The socket is left in a CLOSE_WAIT state until the garbage collector runs.
Attached is our code.
This method class is buried in a long running process that calls this method every n seconds. We see another port get allocated (we use TCPView from SysInternals to watch) every time we call this GetPendingMessages() method. The port ends up stuck in "Close_Wait" until the garabage collector runs.
We're using v5.8 of the Aspose.Network.dll x64 bit.
I have checked the ports with the help of TCPView, the imap port is not released until the program exits or the .NET garbage collector runs. I have logged this issue in our system (ID: 21721). We will look into it and will notify you when it gets resolved. Sorry for the inconvenience.
The issues you have found earlier (filed as 21721) have been fixed in [this update](http://www.aspose.com/community/files/51/.net-components/aspose.network-for-.net/entry271668.aspx).