jstedfast/MailKit — pull request #59 by AntonGordienko (2014-06-19 14:31:57+00:00)
Title: Patch for parsing message/rfc822 body from GMail.

Hey Jeffrey,
I fetch message from GMail with MessageSummaryItems.BodyStructure flag.
GMail outputs:

" (((\"TEXT\" \"PLAIN\" (\"CHARSET\" \"koi8-r\") NIL NIL \"QUOTED-PRINTABLE\" 4452 113 NIL NIL NIL)(\"TEXT\" \"HTML\" (\"CHARSET\" \"koi8-r\") NIL NIL \"QUOTED-PRINTABLE\" 10350 240 NIL NIL NIL) \"ALTERNATIVE\" (\"BOUNDARY\" \"----=_NextPart_001_0539_01CAA4EE.0103D300\") NIL NIL)(\"MESSAGE\" \"RFC822\" (\"NAME\" \"=?KOI8-R?B?0NLF1MXO2snRIC0g9/TiMjQuZW1s?=\") NIL NIL \"7BIT\" 23379 NIL (\"ATTACHMENT\" (\"FILENAME\" \"=?KOI8-R?B?0NLF1MXO2snRIC0g9/TiMjQuZW1s?=\")) NIL) \"MIXED\" (\"BOUNDARY\" \"----=_NextPart_000_0538_01CAA4EE.0103D300\") NIL NIL))\r\n"

And MailKit throw exception while trying to parse envelope for message/rfc822 body.

My patch can help.