0

I'm using MailSystem.Net to receive my mails. When I try to select a folder which contains turkish character it returns me an error.

My code is here:

string folderName = "[Gmail]/Yıldızlı";            
Mailbox inbox = imap.SelectMailbox(folderName);

And the Imap4Exception is here:

Command "select "[Gmail]/Yıldızlı"" failed : 150721051043320 NO [NONEXISTENT] Unknown Mailbox: [Gmail]/Y?ld?zl? (now in authenticated state) (Failure)

How can I fix this issue?

Thanks.

fena coder
  • 217
  • 4
  • 17
  • 1
    ı is not an ASCII character and unextended IMAP only supports ASCII in plain old strings. It supports non-ASCII in so-called "literals" and there's an extension called RFC6855, but it sounds as if mailsystem.net doesn't support either of those. Which is a bug, BTW, literal support is mandatory. You could try to ask for support for literals or for RFC6855, or switch to mailkit. – arnt Jul 22 '15 at 09:11
  • @arnt Folder names need to be encoded in UTF-7, not literals. – Max Jul 22 '15 at 13:01
  • @max You're right, of course. (BTW MUTF7, not UTF7.) So what Mailsystem.net lacks is MUTF7 support, not literal support. (I can imagine why mailsystem.net lacks that: I have implemented MUTF7 and found it an unusually unpleasant experience. Much worse than either UTF7 or 6855.) – arnt Jul 22 '15 at 14:03
  • Most libraries expect you to use M-UTF7 as a separate step, since it's a presentational issue, not a protocol issue. (You don't need to know anything about M-UTF7 to use the protocol, it's not until you format a list of Folders for user display do you actually care) – Max Jul 22 '15 at 17:00

0 Answers0