I had the same problem, this was due the OAUTH authorization mechanism of Google.
You have to download the APK directly from GITHUB if you want to use the google account to make the login, or
you have to allow the pop3 options in the Gmail account and activate the: “less secured applications” option:
From the FairMail Site:
(6) How can I login to Gmail / G suite?
If you use the Play store or GitHub version of FairEmail, you can use the quick setup wizard to easily setup a Gmail account and identity. The Gmail quick setup wizard is not available for third party builds, like the F-Droid build because Google approved the use of OAuth for official builds only.
If you don’t want to use or can’t use an on-device Google account, for example on recent Huawei devices, you can either enable access for “less secure apps” and use your account password (not advised) or enable two factor authentication and use an app specific password. To use a password you’ll need to set up an account and identity via the manual setup instead of via the quick setup wizard.
Important: sometimes Google issues this alert:
This Google security check is triggered more often with less secure apps enabled, less with an app password, and hardly when using an on-device account (OAuth).
Note that an app specific password is required when two factor authentication is enabled. After enabling two factor authentication there will be this error message:
App specific password
about how to generate an app specific password.
Enable “Less secure apps”
Important: using this method is not recommended because it is less reliable.
Important: Gsuite accounts authorized with a username/password will stop working [in the near future]
If you use multiple Gmail accounts, make sure you change the “less secure apps” setting of the right account(s).
Be aware that you need to leave the “less secure apps” settings screen by using the back arrow to apply the setting.
If you use this method, you should use a [strong password] for your Gmail account, which is a good idea anyway. Note that using the [standard] IMAP protocol in itself is not less secure.
When “less secure apps” is not enabled, you’ll get the error Authentication failed - invalid credentials for accounts (IMAP) and Username and Password not accepted for identities (SMTP).
General
You might get the alert “Please log in via your web browser”. This happens when Google considers the network that connects you to the internet (this could be a VPN) to be unsafe. This can be prevented by using the Gmail quick setup wizard or an app specific password.
Best regards!