0 votes

Hi

Sometime emails from POP3 server show the subject with the utf-8 tags included like so:

=?utf-8?q?Alarmfrom030024B6-HGHHvammurEfri?=

by

1 Answer

0 votes

Most likely email is incorrectly encoded, Mail.dll decodes properly encoded encoded-words.

string eml = @"subject: =?utf-8?q?Alarmfrom030024B6-HGHHvammurEfri?=

body";

IMail mail = new MailBuilder()
    .CreateFromEml(Encoding.ASCII.GetBytes(eml));

Assert.AreEqual("Alarmfrom030024B6-HGHHvammurEfri", mail.Subject);

Can you attach raw eml version of the email headers?

by (301k points)
...