Problem with ImapDecode and HTML Messages


When a message comes with QuotedPrintable encoding and the message is in HTML, I noticed that I was getting mal-formed html back from the IMAP dll. It was "eating" the sumbols: ="
Which of course is very common in html... I didn't fix the problem per-say, however I did fix it in my program by:
  1. Commented out the call to ImapDecode in ImapCommand. ParseBodyPart.
  2. Use the following library to decode the message instead: http://www.codeproject.com/KB/security/TextCoDec.aspx
This solved the problem and now html messages are showing up properly.



DieBagger wrote Oct 26, 2009 at 10:33 AM

the problem occurs when messages are NOT encoded QuotedPrintable and the program tries to decode them...

Is the developer still around? If yes, could you please explain what the code:

else if (chars[i] == '_')
         bytes[j] = (byte)' ';
does and why this is needed?

The decoding seems a little buggy but otherwise great lib, thx