This project is read-only.

Decoding quoted-printable strings

Feb 14, 2013 at 7:16 AM
The Cyrillic subject is received encoded with the quoted-printable encoding.
It would be great if the netDumbster provided a method to decode such strings (e.g. it can provide a Subject property in the SmtpMessage class that will contain decoded version of the Headers["Subject"]).

I used the following function to decode quoted-printable strings (which is slightly modified function from
    public static string DecodeQuotedPrintable(string value)
        var concatenated = value.Replace("?= =?utf-8?Q?", "");

        var attachment = Attachment.CreateAttachmentFromString("", concatenated);
        return attachment.Name;