Closed nakhli closed 12 years ago
There actually should be an empty constructor for exactly that purpose. I'm not sure how it was lost.
It would be great if you can add it back :-)
A side note for the future: it seems that in case of error, the exceptions thrown are all of type System.Exception. If you can add specific types to help handling errors it would be great.
I actually prefer to pass errors through, instead of wrapping them, to preserve the stacktrace and as much information about the error as possible.
Turns out PopClient did have the empty constructor, so I'm not sure what happened with the ImapClient.
Thank you for the quick fix.
When a ImapClient or Pop3Client client instance is created, it connects and logs in in the constructor. There is no alternate constructor that allows only creating the instance first and then use the public methods Login and Connect later.
What is the rational behind imposing connection and login in constructor when we can switch both server and user later on?
One of the incurred issue is that the connection to server and the user login/pwd cannot be tested independently.