andyedinborough / aenetmail

C# POP/IMAP Mail Client
369 stars 153 forks source link

GetMessages Returns Misleading Exception #182

Open Yossi-G opened 9 years ago

Yossi-G commented 9 years ago

We've been testing and we stumbled across the fact that GetMessages returns a misleading exception description in certain circumstances. What we have found - If you request more messages than currently exist in the mailbox, the following message is returned:

Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

The specificity of the message thus leads the developer's diagnostic in the wrong direction. It would be better if the error message would indicate 'bad parameter value' or 'parameter value out of range' or something like that.

I'm relatively new to OS, so I'm not sure what the protocol is in cases like this. Should I obtain the code and make the proposed change?

Thanks for your advice!