(SOLVED)
Hey, are you using KMail with GMail over Kubuntu 15.10? Are you getting something like this picture? I can give you the assurance that my password is right.
Hey, are you using KMail with GMail over Kubuntu 15.10? Are you getting something like this picture? I can give you the assurance that my password is right.

Clay Weber (claydoh)Moderator3 accounts, no problems here.. Are you using your normal google password, or
app-specific passwords - which is what you need to create and use.
The error message gives you some of this, in the link it gives you.
https://support.google.com/accounts/answer/185833
https://security.google.com/settings/security/apppasswordsNov 3, 2015
Dear +Clay Weber , I've been using Thunderbird with GMail. Configuring Thunderbird by the first time I was asked to login on GMail by a simple web page prompt with GMail page. And I gave an authorization to Thunderbird to use GMail. However, on KMail I wasn't asked to authorize anything.
On System Settings I had got an authorization to Akonadi and KDE PIM throws a web page prompt. But on KMail I didn't get this web page prompt to authorize KMail to uses GMail Imap.Nov 3, 2015
Just go to the page I linked to, to create a custom password, and enter that in your mail account settings.
I don't know if it is supposed to have a popup or not, like thunderbird, but as it didn't, you have to go and do this step, which is manually doing what the authorization popup is doing for you.Nov 3, 2015
Thanks for your reply. I got it work now enabling the option "Allow less secure applications: ENABLED".Nov 3, 2015