andyedinborough / aenetmail

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

Fixed a SocketException in the Pop3Client. #178

Closed moonpyk closed 9 years ago

moonpyk commented 9 years ago

Actually while reading a message, the Pop3Client.GetMessage(..) attempts to call GetResponse() another time if first call returned an empty string. Some messages sent with Lotus Notes on a SmarterMail server make this second call crash inside the Utilities.Readline(...) function, the POP server already sent everything back and there is nothing to read back anymore.

Investigations shown that the content of the message was properly populated inside the MailMessage "msg" return value.

The issue is fixed by protecting the second GetResponse call with a try

moonpyk commented 9 years ago

@jstedfast Changing library, for now is definitely not an option for us. But I'll keep that in mind the patch get definitely rejected.

Regards.

moonpyk commented 9 years ago

@andyedinborough :+1: