I am trying to open the children mailboxes of my main mailbox but it doesn't work. I get the following error in the debug mode.
'A5 NO [NONEXISTENT] Unknown Mailbox: INBOX/[Gmail] (Failure)'
But when I am listing of the mailboxes i can see that [Gmail] box exists so I don't understand what's wrong.
<= '* LIST (\\HasNoChildren) "/" "INBOX"'
<= '* LIST (\\HasChildren \\Noselect) "/" "[Gmail]"'
Here is the code that creates the error (I am using imap-simple) :
const connection = await imaps.connect(this.imapConfig);
const inbox = await connection.openBox('INBOX/[Gmail]');
Could you help me, please?
The mailbox name in the second
LISTresponse is "[Gmail]", it is not "INBOX/[Gmail]".LISTresponses contain the full and correct name; if there's a heirarchy the server will tell you the full name of everything, so you don't need to concatenate anything.(You've probably heard or read that everything is under INBOX, which it is on some servers, but not on all.)