Kmail connection to gmail not working

Apologies in advance for my technical ineptitude. I am having trouble getting kmail to receive my gmail inbox.

I linked my gmail account to kmail the normal way (settings > configure kmail > accounts > receiving > add > add mail account), but my gmail inbox isn’t showing up in the folders pane. The IMAP account has the status “Server is not available.”.

I’m using SSL/TLS encryption, port 993, and XOAuth authentication.

Let me know if there’s any more info I can provide to help.

Ok, I have an interesting update. I have multiple email accounts, and when I tried to add a different one, it worked fine. The first account is still not working. What would cause one account to work fine, but another to not work at all?

You need to connect to gmail with an app password.

See Gmail Accounts with Kmail – CubicleNate.com for tutorial.

Google must have updated the layout of the settings menu, since I can’t find the app passwords option under 2FA. Do you know where it’s moved to?

Also, huge thanks for the help. I’m feeling very lost.

Sorry for the delay; it’s very hot in France at the moment.

In your Google Account —> Security and sign-in, click on Two-step verification (which should already be enabled); right at the bottom of the page, you’ll find ‘App passwords’.

I hope this helps.

Have a good evening.