mail.Headers.Add changes the content given as argument if eastern European chars are present
ulued opened this issue · comments
OS: Windows
.Net 4.7.2
Mailkit 3.4.2
mail.Headers.add(new Header(Encoding.UTF8, "X-OurFilename", "V každém z nás je kousek dítěte_ Oslav den dětí. _.eml"));
Results in value "V =? utf - 8 ? b ? a2HFvmTDqW0geiBuw6FzIGplIGtvd" written as additional header value.
Reproducible with Version 3.4.2, no Exception, just the strange value, which looks like code
The issue does not appear, if none of the characters like 'ž' are present.
That's by design and is the correct way to encode non-ascii headers.
X-WDFileName: V
=?utf-8?b?a2HFvmTDqW0geiBuw6FzIGplIGtvdXNlayBkw610xJt0ZS4gT3NsYXYgZGVu?=
=?utf-8?b?IGTEm3TDrS4=
?= _.eml
Why then is the last token "?= _.eml" there, which is NOT base64 coded?
I found mimekit for the decryption