I am phasing issue of the retriving folderlist of the GMAIL using IMAP protocol.
Things is that whenever I am trying to retrive folderlist using LIST command and XLIST, but it will give me error means BAD command so is there any other command to retrive the Folderlist.
My command is like
byte[] commandBytes = System.Text.Encoding.ASCII.GetBytes((("$ XLIST \"\" \"*\" \r\n")).ToCharArray());
and also pass the LIST Command but still I am not able to get folder list it say BAD Command not to parse.
LIST(orXLISTon GMail) is the only way to get a folder list. YourLISTcommand should look something like the following:That retrieves all the user’s folders. If you just want top-level folders (which in GMail maps to your labels), you’d use