andyedinborough / aenetmail

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

Fixed crash on reading email without a body #124

Closed HellBrick closed 10 years ago

HellBrick commented 11 years ago

Sometimes when IMAP message doesn't have a body, MailMessage.Load() attempts to read it anyway from beyond the response length, which leads to timeout and IOException. This is a fix for the issue.

kivikakk commented 11 years ago

:+1: We just ran into this, and it took forever to diagnose. We were just preparing a pull request when I decided to look at the ones that were there already, and now I see this!