This project is read-only.

Reading from non base 64 encoded messages

Jul 9, 2009 at 5:52 PM

Hi,

FYI:

Under IMAP.cs in the ProcessBodyContent method, you are checking if the encoding is "base64", if it is you store data in content.BinaryData, and if not you store in content..TextData. Now in the same file under the method of ProcessBodyParts, when the attachment is a file, you are directly reading from BinaryData, which will throw a NullReferenceException if the message is not a base64 message. You need to read from BinaryData only if it is not null else read from TextData.

- AB

Jul 14, 2009 at 11:01 PM

IMAP.cs is from the old code base which isn't being maintained anymore. Please update to the most recent version of the code and use the Async client. the GUI and IMAPShell projects should help you get started using the new code.