jstedfast / MailKit

A cross-platform .NET library for IMAP, POP3, and SMTP.

Home Page:http://www.mimekit.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mail.Headers.Add changes the content given as argument if eastern European chars are present

ulued opened this issue · comments

commented

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.

commented

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?

commented

I found mimekit for the decryption