+2 votes

I created a Gmail account in Portugese. Using the API, I got the folder for INBOX, called "Caixa de entrada" and when I try to select it using the API, select folder by name, I got an exception. See below.
2 Questions:
1. Why the API send me a folder name that I cannot select?
2. Why the name "Caixa de entrada" is different from the one in the Gmail UI "Entrada"?

Exception: Limilabs.Client.IMAP.ImapResponseException: [NONEXISTENT] Unknown Mailbox: Caixa de entrada (Failure)\r\n at Limilabs.Client.IMAP.Imap. \u0004(ImapCommand command, Boolean throwException)

by

1 Answer

0 votes

Gmail uses national names for many IMAP folders including INBOX, however you can't select inbox using it's national name. You need to use 'inbox' name instead.

1) Why the API send me a folder name that I cannot select?

You should ask Gmail for that. In my opinion this is Gmail's IMAP bug.

Mail.dll includes a workaround for that, but you need to use FolderInfo overload e.g. Imap.Select(FolderInfo).

FolderInfo includes folder purpose for common folders, so Mail.dll can use 'INBOX' name and disregard the national name if folder's puropse is inbox.

2) Why the name "Caixa de entrada" is different from the one in the Gmail UI "Entrada"?

This I don't know and can't answer. I have never heard of such situation.

by (301k points)
...