Folder (label?) shows unread messages but there aren't any unread messages in it

eM client is showing unread messages in a folder on a gmail account. Looking in that folder in eM Client, or any other email client (including the gmail web client), shows no unread messages. How do I get rid of the unread messages count when there aren’t any unread messages?

Fully paid/licensed “Pro” version 9.2.2038 on up-to-date Windows 10.

First off go online to your webmail and see if there are any unread emails in that folder or label.

If there is unread emails online in your webmail, change the status to read of those emails and then close and reopen eM Client.

However if there are no unread emails online in that folder or label, then sounds like your database needs repairing.

To manually repair the eM Client database in Win 10, first close eM Client and then open a Dos prompt. Then type in the following and press enter.

“C:\Program Files (x86)\eM Client\MailClient.exe” /dbrepair

Next if that doesn’t fix it, then you have 3 options -

1). If you use Gmail as a standard IMAP setup and you have been doing regular eM Client backups and you know it was ok when you last backed up, you could then restore a recent dated backup via “Menu / File / Restore”.

Or

2). If you use your Gmail acct as a standard IMAP account, then you can try running the repair on your Gmail account & folders.

To repair your Gmail account, “right click on the All Mail folder” under your Gmail account in eM Client and then “click Properties at the bottom”. Then “click the Repair tab along the top” and lastly click Repair.

Note: When you repair an email account in eM Client, it clears the local cache in eM Client so messages will be slow to re-read again till fully cached.

Or

3). Remove and re-add your Gmail account using the automatic email wizard via “Menu / Accounts”

Note: Before removing and re-adding your Gmail account, make a manual backup of eM Client via “Menu / Backup”. You can see when the backup is complete in “Show Operations” via the dropdown on the right of Refresh top left.

Thanks.

I have checked at my provider (and said so in my OP). The folder/label has no unread messages in it.

I have rebuilt the folder in eM Client. Twice. Didn’t help. And doing so put eM Client out of service for around 2 hours while it did it.

I am very, very reluctant to remove/re-add a gmail account since it can take days to do it. I’ve mentioned this before in a question a few years ago but eM Client’s insistence on only using the google mail api instead of also allowing regular IMAP for gmail is an issue for me (and a lot of other people, too) because it requires you to export/“make visible” the “All Mail” folder which, in my case, is enormous. And since Google has a daily download limit much smaller than my All Mail file, once the limit is reached it locks you out for the rest of the day.

Anyway, if I have to do that it will not be the first time since switching to eM Client that I’ve had too. I don’t expect that of an email client that costs as much as eM Client. I bought eM Client partly due to my expectation that I wouldn’t have to constantly rebuild folders and remove/re-add accounts. For example, before I started using Windows I exclusively used Mail.app on MacOS and in 13 years never once had to do either of those things.

eM Client’s insistence on only using the google mail api instead of also allowing regular IMAP for gmail is an issue for me

eM Client “does use normal IMAP” for Gmail with the latest OAuth token. I use that with my own personal Gmail account and it works perfectly. I also have friends who run business Gmail IMAP accounts with eM Client and they also have no issues. Not sure why you think it’s not the regular IMAP. Most other major providers also do that.

I have rebuilt the folder in eM Client. Twice. Didn’t help. And doing so put eM Client out of service for around 2 hours while it did it.

What did you do to rebuild it ? Can you advise the steps you did to rebuild it.

Also have you been onto eM Client Pro support via the following webpage as you purchased the mail client so suggest to do that. Eg: You might need to send in logs etc to diagnosis the problem.

We can only give limited help on this free forum.

Before you do anything, did you do the database repair as @cyberzork suggested?

Running the "C:\Program Files (x86)\eM Client\MailClient.exe" /dbrepair command will not affect your bandwidth usage in any way.

1 Like

Yes. I’ve done that. And to be sure I just now closed eM Client and cut-and-pasted the commandline you give and it didn’t fix the problem. The folder in question still shows 11 unread messages but when I look in the folder in eM Client there aren’t any unread messages. Nor are there any shown in the gmail web interface (i.e. mail.google.com). The folder is also shown as not containing any unread messages in Mail.app on MacOS, Aqua Mail on Android, Spark on iOS nor Thunderbird on Linux.

And @cyberzork: Does eM Client allow vanilla IMAP with gmail now? Because it definitely didn’t used to. And note that I don’t mean “does gmail allow it” because I know gmail allows it - it’s how I connect to gmail from all the other mail clients I use. Last time I tried (like March of this year I think), Em Client insisted on setting up gmail accounts as gmail accounts, it wouldn’t let you set them up as IMAP, and insisted on “All Mail” being made visible (or whatever gmail calls it). If you can set up gmail accounts in eM Client as ordinary, non-gmail, plain vanilla IMAP and not make “All Mail” visible then that’s new and I’ll haply switch to that if it is.

@notMyUserName

I just now closed eM Client and cut-and-pasted the command line you give and it didn’t fix the problem.

Then as the manually database repair didn’t fix the problem, the next step is to “try repairing your Gmail account” which re-syncs all your local eM Client labels & folders with your online account, or “try removing and re-adding your Gmail account” via the wizard as mentioned in my previous post above.

Em Client insisted on setting up gmail accounts as gmail accounts, it wouldn’t let you set them up as IMAP.

You can manually add an IMAP account via “Add account / Mail / Other”, but from what i understand Google now as a company “won’t allow IMAP to work with a generated app password” unless its a POP account which some eM Client users still do that way because they don’t want to use IMAP as yet. Google want you to now use the OAuth token authorisation method which only works in eM Client via using the automatic email wizard. As i said previously that works for myself & friends perfectly.

So you can certainly try adding your Gmail IMAP account “using the manual method” in eM Client with your gmail address and a generated app password from your Google account, but no guarantee that it will work, as i believe Google has disabled that manual method for IMAP. So if it doesn’t work, speak to Google.

Note:- If you do try using a Generated app password when manually setting up your Gmail account, you also normally need 2 step enabled in your Google account as per the Google webpage link above,

Insisted on “All Mail” being made visible (or whatever gmail calls it).

The All Mail folder “is part of all Google Gmail accounts” and will show on any mail client you install. eg: I just installed the latest Thunderbird Mail to test and after adding my Gmail account using again the automatic email wizard like in eM Client, the All Mail folder shows just like it does in eM Client, Without All Mail you don’t have a Gmail account as every label in Gmail connects to All Mail for Gmail accounts.

You can however hide the All Mail folder in eM Client, via “Right clicking on All Mail” and selecting “Hide”. It will then appear under “More” at the very bottom of your Gmail account. If you then want to see it again later, you can right click it again and click “Show”. Or just click on All Mail under More.

Note:- One thing with Google Gmail accounts and showing the All Mail folder is that eg: If you Archive an email in your Gmail account, it then “only shows in the All Mail folder”. Also if you accidentally remove a Gmail label, it will then only show in “All Mail”. So in my opinion its good to show All Mail to then be able to recover messages from the All Mail folder if you need to for any reason,

As I’ve explained, both of those things take forever and mean that I can’t use my primary computer, the one I sit in front of most of the day, for email until it’s finished. I’ve been through this before and may decide to just live with the problem rather than do that.

Which works completely fine with every other email client I use when adding an IMAP provider. It, at least up to the last time I tried, didn’t with eM Client which requires the account be added as a gmail account, not IMAP. And like I say, maybe it works now? I’ll have to try.

Not it doesn’t, you don’t have to make it visible and gmail works as an IMAP server just fine without it.

Log into your gmail account online and go to "Settings->See All Settings->Labels. Under “System labels” you will see “All Mail” and in the far right column of that row you will see “Show in IMAP” where you can turn it on and off. If you turn it off it won’t be shown to IMAP clients (i.e. an IMAP “LIST” command won’t show it and IMAP clients can’t access it). In general, aside from “Inbox” all other “System labels” can be turned off and not “shown in IMAP”. Gmail has this turned on by default these days but didn’t used to and you can turn it off. If the email client only knows IMAP and doesn’t know how to use gmail labels then this folder is useless. In IMAP labels are shown to the client as IMAP folders (sometimes called mailboxes in IMAP-speak). This works completely fine. I myself use four other clients that work that way without it in gmail and until eM CLient have literally never had it turned on.

Edit to add: At least up until early this year when I last tried, you couldn’t set up a gmail account in eM Client and then turn off “All Mail”. If you did that eM Client would complain and not work with that account.

@notMyUserName

Log into your gmail account online and go to "Settings->See All Settings->Labels. Under “System labels” you will see “All Mail” and in the far right column of that row you will see “Show in IMAP” where you can turn it on and off

Yes I’m already aware of that, but even if you disable All Mail online, mail clients normally cannot work without that as far as I know as need the All Mail folder enabled to work with Gmail.

I myself use four other clients that work that way without it in gmail and until eM CLient have literally never had it turned on.

As that works in your other email clients (without the All Mail enabled in your Gmail account online), then unfortunately that’s not how eM Client works and you would then need to use your other Mail Clients if you want to do it that way.

eM Client syncs all Gmail folders and labels and “doesn’t have options to only just specify certain server folders”. Your other Mail clients might be programmed different ways to allow that.

What mail clients allow you to add a Gmail IMAP account without having to enable All Mail ?

If you ran the database repair correctly, and it did not fix the issue, then you will need to remove the account from eM Client and add it back gain.

Thanks. For now I’m gonna just have to live with the erroneous unread count for a while until I’m on vacation or something because doing it will lock me out of eM Client on my PC and from that gmail account on everything else since the download limit is account based, not client based (i.e. once the download limit is reached, regardless of how, everything that wants to download from that account gets locked out).

Also, if it helps at all, the number of unread messages eM CLient shows being in that folder has gone up by two overnight but there are still no unread messages in it.)

I already listed them.

TLDR; gmail works just fine as an IMAP server but eM Client disallows that, and that has nothing to do with gmail.

eM Client requires what it requires, which is fine, and does not (or at least didn’t), unlike many other apps, allow you to use gmail as IMAP. It (again at least didn’t used to) allow you to go through the process to add an IMAP provider with gmail. eM Client can work however its management wants it to work and I’m completely fine with that but arguing that it needs to work that way for some technical reason is wrong. It doesn’t. The way eM Client does it is a choice on eM Client’s part, not a necessity. All eM Client would need to do, if it chose to, is allow you to add gmail as an ordinary IMAP server and it would work fine. But, up until the last time I tried, I didn’t.

Edit to add: I just tried and after going through the process of adding a gmail account as a “Mail” account (rather than gmail) in eM Client everything works fine (google still supports App Passwords the way it always did) until the very end of the process when eM Client tells you that you have to go set All Mail to “Show in IMAP”.

Edit 2: Just as a “proof of concept” I downloaded and installed Thunderbird 115.1.0 on my Windows machine. I added a gmail account with “All Mail” not shown. It successfully used OATH to authenticate the account and added it just fine with no “All Mail”. For various reasons, Thunderbird doesn’t meet my needs (whereas eM Client, this and other issues/bugs aside, generally does) but it is evidence of what I am saying. I also have that gmail account (it’s an existing account that I use) installed in three other clients and it works fine.

@notMyUserName

I downloaded and installed Thunderbird 115.1.0 on my Windows machine. I added a gmail account with “All Mail” not shown. It successfully used OATH to authenticate the account and added it just fine with no “All Mail”

As that is the case, then I would just hide the All Mail folder in eM Client after adding the account via OAuth as obviously eM Client needs All Mail to work and no way around it at this time.

Yeah. The problem isn’t that I see the folder, the problem is that in my case “All Mail” is 10+ GB and Google’s daily download limit is 2.5GB. So, for example as has been suggested in this thread to solve my original problem, removing and re-adding this gmail account will take 4+ days just to sync “All Mail” during which eM Client will be unusable and so will that gmail account in my other clients. I.e., it will start syncing, quickly reach the daily limit and then lock me out for a day. Repeat until the sync is complete. This was a huge problem when I first started using eM Client because not only did eM Client need to sync “All Mail”, since they’d never seen it before (it had never been “Made visible in IMAP”) so did all the clients on my other devices.

The problem I have with “All mail” is that this is like maybe the third time I’ve had to delete and re-add a gmail account in eM Client to fix something. So I guess what I am saying is that, for my use case, eM Client needs to either get its act together regarding not requiring removing/re-adding accounts to fix something, or to stop requiting “All Mail”.

Have you tried this?

Right click on the mail box with the error and choose “Properties” then choose the tab “Repair” and choose Repair again. It will delete the contents of the mail box then resync with server.

@notMyUserName

The problem isn’t that I see the folder, the problem is that in my case “All Mail” is 10+ GB and Google’s daily download limit is 2.5GB.

If that’s the case, then i would suggest to talk to Google about. Maybe they can look at increasing that daily download limit in the future.

My own Google mail is way more than 10 GB and never seemed to be a problem for me in eM Client. Yes initially did take a few days to completely download and fully cache, but i had no issue with that.

Once all the mail is fully cached, if you then use the built-in eM Client backup regularly, (if you then ever have a problem), you can then just easily restore your backup and you then only d/l new or changed mail. So won’t take all that initial time again to download. That’s what id recommend you do.

Thanks. Yes. Several times in fact. Although it seemed to do what you say, the unread count stayed what it was and there were still no unread messages shown.

I’ve also tried (in eM Client) selecting all the messages in the folder with ctrl-a and then right-clicking and selecting “Mark as read”. That didn’t do anything either.

Yeah. I’m sure that will help.

How would that solve my current problem?

How would that solve my current problem?

For the Unread label problem as you are already aware, your only option keft now is to (remove and re-add your Gmail account) being the Database repair and Gmail acct repair options didn’t work.

So as you say it takes 4+ days to re-download All Mail again (if you removed and re-added your Gmail account) to avoid that problem if this happened again, you could alternativily in future just (restore it instead from an eM Client fully cached local backup), which would then avoid you waiting 4+ days to re-download All Mail.

Everything is then back as it was in a few minutes rather than taking days to setup again.

Could be “ghost” unread emails (nothing to do with eM Client)?

Go into your inbox in your Gmail account (ie via web browser).
Click the arrow next to the small box under the search bar
image

Click Unread.
Select all Unread mail.
Click off the box.
If you want to delete those messages, Press the Delete button, or whatever.

Google give you a daily bandwidth limit, and when you reach that, they throttle the download. They don’t lock the account, it continues to download, just at a slower speed.

1 Like