General Computing
email microsoft-outlook gmail imap
Updated Tue, 21 Jun 2022 19:33:54 GMT

Outlook IMAP connection to Gmail shows unread messages, but there are none


I initially posted this question to a vendor site, but my luck there is hit and miss.

Symptoms in a nutshell: The email folder pane shows that the "All Mail" folder have 2 unread messages, but when click that folder and choose "Unread" from the top of the message list, there are no unread messages.

How can I force a correction to the "Unread" indicator in the email folder pane?

Where the problem likely lies: Gmail's webmail interfaced doesn't show any unread messages, so I think that the bug is in Outlook. I see it in both Outlook 2013 and 2019, on separate Windows 10 machines. The pervasiveness of the problem suggests that it is either a bug inheritted by Outlook from version to version, perhaps in its engagement with the IMAP protocol and/or its own bookkeeping, or it is due to erroneous IMAP information from Gmail. I don't know how the "unread" count is generated, so I can't speculate more precisely on the cause. From the page cited by resondent Jeff Yang7 below, however, the problem also occurs with Exchange servers, so I suspect it is a bug in Outlook.

Troubleshooting steps taken

I've tried syncing with F9 and Shift-F9, but the disparity remains.

I initially didn't want to recreate that IMAP account. I have a lot of messages, and it takes forever to sync from scratch. Eventually, I relented. I deleted and recreated the account, but Outlook shows the same disparity in the number of unread messages (2). Very odd. Furthermore, Outlook seems to have created an extra message based on an old email thread, but dated today, and which does not actually exist in Gmail (at least according to the webmail search function). Also, a number of messages I sent today seem to be missing.

Even if I select all messages and mark them as read, the folder navigation pane still shows 2 unread. The Outlook/Gmail interface seems to be extremely buggy.

I searched for read:no and marked the few unread messages as read, but the count is still off by 2. I didn't delete the profile because it contains several accounts. Recreating one account was the nuclear option due to the lengthy sync time, and recreating an entire profile would be the hydrogen bomb option, on which I want to hold off for now. If that is the fix, it has an exorbitant price.

I see the same disparity in count using Outlook 2013 and Outlook 2019 on separate machines, both with IMAP connections to the same Gmail account. If it is fixable by recreating the profile, then the problem is too pervasive for such a costly solution to be worthwhile. Since outlook /cleanviews also clobbers custom views and requires recustomization, I'm debating whether the same also applies to that solution (I haven't tried it).

I tried outlook /cleanips, but all that did was launch Outlook. The disparity in count of unread messages was still present. For reference, in Windows 10, I found Outlook.exe in C:\Program Files\Microsoft Office\Office15.




Solution

I got the unread messages down to zero by right-clicking the problematic folder in the email folder navigation pane and selecting Mark All as Read.

My answer was inspired by a related solution in the thread cited by Jeff Yang. That solution, however, was in the context of web access. I was able to perform the same actions, however, on my Outlook desktop app.