andyedinborough / aenetmail

C# POP/IMAP Mail Client
370 stars 153 forks source link

International decode in mailbox naming #114

Open razinalex opened 11 years ago

razinalex commented 11 years ago

Hi again. I have the next problem with correct decode russian names. Code: ImapClient ic = new ImapClient("imap.mail.ru", "abcabcxxx@mail.ru", "iecnhtymrj",ImapClient.AuthMethods.Login, 993, true); // Select a mailbox. Case-insensitive Mailbox[] boxes = ic.ListMailboxes("",""); foreach (Mailbox m in boxes) { Console.WriteLine("----"); Console.WriteLine(m.Name); Console.WriteLine("----"); }

Some folders have russian name and for them output like "&BB4EQgQ,BEAEMAQyBDsENQQ9BD0ESwQ1-"

Is it possible to fix this?

jstedfast commented 10 years ago

IMAP uses a modified UTF-7 charset encoding for international mailbox names (i.e. anything outside of the US-ASCII range).