emailoutlookimapmailkitillegal-characters

Got Different Email Subject While Retrieve Using Mailkit


Currently I'm trying to retrieve email message from outlook o365 using Mailkit 3.4.2 and connect via IMAP. When I try to get the message detail, there is different value between the original email Subject part of original subject with what I got using Mailkit. Subject retrieved using Mailkit

there is something like \u001b$B!>\u001b(B replacing the - char. Anyone has encountered some problem like this?


Solution

  • It looks like your original subject has escape sequences in it (\u001b is the Escape key encoded in Unicode).

    What does the raw subject look like?

    If you open the message in a text editor, does the subject appear as binary garbage? Or does it look more like “=?iso-2022-jp?b?base64blob?=“?