0 votes

We recently upgraded our Mail.dll from 3.0.13208.1855 to 3.0.14185.1633

In the old version when you call GetFolders() you get back the entire list of folders, even if they are marked as "Do not show in IMAP" in Gmail.

In the new version, folders do not appear if marked as "do not show", unless one of their children is "shown", in which case the parent is also shown.

Is there a way to enable to old functionality in the new version? Some flag or configuration option?

by

1 Answer

0 votes

There was no change regarding that in Mail.dll.

If Gmail doesn't send the folder name, there is no way for Mail.dll to receive it. You must be mistaken about this working differently in previous version.

by (301k points)
While I understand the logic behind your answer, I have confirmed that by switching the DLLs and using the exact same code on our part, we get a different list of folders between the two versions. I can send you screenshots or something if you would like.
Can you please turn logging on for both versions: https://www.limilabs.com/blog/logging-in-mail-dll
You can send that directly to us. You can find the email in the page footer.
On further testing, we have discovered that the issue is not related to which DLL we are using, but which auth method. When we use Oauth1 (key/secret) we get a full list of folders. When we use Oauth2 (service account) we do not get the full list of folders. Can you confirm this on your end and check if there is anything else that can be done?
No, I can't confirm that. Gmail's "Show in IMAP" settings behaves exactly the same in OAuth 1.0 and 2.0. You'll not receive folders hidden from IMAP by using OAuth 1.0 authentication.
I have emailed logs showing the disappearing labels to the support email below.
I can see in the logs what you are talking about.

Do you observe this behavior on different accounts?

At this point I don't see what we can do about it. It's the server that behaves differently, based on the authentication method. You can see the in the logs.

It seems like a server bug, related to this particular account, as I can't reproduce that on different accounts.
...