I’ve recently started having trouble with my gmail accounts configured in the default /e/OS mail application.
They worked fine for about a month, but last week one of the accounts suddenly refused to authenticate on the SMTP server (outgoing emails), while the incoming emails were still downloading fine. The error was "username or password incorrect (assuming the error message was coming directly from google, as it contained a link to a google help page with troubleshooting steps for when you input the wrong credentials).
Thinking I have inadvertently screwed up some settings in the accounts section (I had recently removed calendar and contacts sync’ing), I removed both gmail accounts from the mail app and both mail accounts from settings (Passwords & accounts) and set them up from scratch.
They worked fine for a few days but then one account stopped receiving emails and 2 days later the other account stopped as well. If I test my outgoing server I get the same message as above, and If I test my incoming server I get a similar message (see below):
It almost looks like the app fails to renew its OAUTH authentication token. I know it’s not a google issue, as I also connect (via OAUTH 2.0) to these accounts from a desktop mail app which is still receiving and sending emails successfully.
Anybody has any ideas? Any way I can turn on further logging in /e/OS MAIL app to get more info?
Something new that I discovered (might not be the whole cause of my troubles, but it’s definitely part of the problem): if I play with the default settings for Push folders and/or Pull folders items in the account settings menu, Fetching mail submenu, the mail app eventually stops sync’ing emails from gmail (usually it seems to take 1-2 days before the sync stops). I tried resetting these settings to default and suddently the mail client re-started sync’ing new messages from gmail.
Same problem here on a Fairphone 4. I could not describe it better as you did!
Sadly, I have tried to play around with the settings and removed the account many times, without spotting the causing the error.
However, suddenly things have started to work this morning, for no apparent reasons (no updates).
I ended up giving up on the default mail app in /e/OS and installing K9 Mail directly, for two reasons:
1 - I am hoping K9 mail will not have the same issues as the default mail app (even though this is a fork of it) as it is a newer version and it worked perfectly with gmail accounts on my old android phone
2 - as soon as you configure a gmail account in the default mail app, the os takes over the account sync (contacts, calendar, etc) and requests full access to google. If you configure a gmail account in K9, it does not appear under settings/accounts and it only requests email access privileges.
Will report in a month or so, as to wether K9 mail continues to work fine or will crap out like the /e/OS default mail client
After further investigation, now I’m inclined to think it’s a app bug rather than a failure of the OAUTH token refresh process, for the following reasons:
sync has been at 1h for each mail account since the beginning (while it was working, when it broke and afterwards)
I’ve already tried various IMAP idle push numbers and it didn’t seem to affect this issue
just changing push/poll folders config brought it back to life instantly, but 2-3 days later is started failing to sync emails again (which points to an app bug, in my book).
google tells me the account manager session is still logged in (while I get the errors to connect to either incoming or outgoing mail servers), so the auth token should still be valid
while the app is in this “broken” state, the accounts page in settings is still able to properly authenticate to google and gives no errors.
However, irrespective of the above issues, just for reason #2 above, I’ll stick with K9 mail - I do not want the OS to handle various individual online accounts and I want to be able to choose if the phone or any app installed, should be able to see (or not) various components of my google account (for obvious privacy reasons).
By the way, after some while it suddenly stopped working again.
There was a recent update (now I am on e/ 1.6-s), which I was hoping to settle things, but I was wrong, in fact the problem is persisting.