Neither IMAP nor POP3 working properly with Gmail

My wife’s Samsung S4 (with Android version 5.0.1 and K-9 version 5.807) started playing up several days ago…

Each time she booted-up the phone, K-9 downloaded hundreds of old e-mails (from gmail.com), going back to 2021! If she selected all and deleted them, they were gone for the rest of that day. But next day when she restarted her phone, they all came back!

(Her main way of receiving e-mails is on her Win10 64b PC via Outlook 2003, and that was behaving correctly – no unwanted old e-mail downloads.)

I didn’t know why, but suspected it might be something to do with her K-9 A/C being set up (by default) for IMAP (I have never had that work nicely on my own phone). So I deleted the IMAP account and set up POP3 account instead. The incoming and outgoing server checks passed.

I then sent a series of test e-mails (from my PC) to her account eddress, and warned her not to view or do anything with them in Outlook. Occasionally one would turn up on her phone, but mostly nothing arrived. (K-9 poll interval is set to 15 minutes.)

I was unable to connect her phone to my (Win7Pro64) PC to download a debug log.

Can anyone suggest what I can try to get her phone K-9 mail working again?

Thanks,
Daniel

This is caused by Google implementing 2-factor authentication. If an app doesn’t support it (and K-9 Mail does not), then you need to use an app password.

Jeff,
Thanks for your response, but I already knew that, and have used the app password Google supplied, long ago, for my wife’s account.
In the meantime, my wife’s phone now seems to be receiving e-mails again through K-9. So we can close this thread now.
Daniel