I tried to login to my Gmail account using the default Mail app. But getting error like Invalid credentials.

error msg while logging in

1 Answer 1


You need to create an app password and use that to log in in elementary.

Follow these instructions to create a new app password:

  1. Go to your Google Account.
  2. Select Security.
  3. Under "Signing in to Google," select App Passwords. You may need to sign in. If you don’t have this option, it might be because: 2-Step Verification is not set up for your account. 2-Step Verification is only set up for security keys. Your account is through work, school, or other organization. You turned on Advanced Protection.
  4. At the bottom, choose Select app and choose the app you using and then Select device and choose the device you’re using and then Generate.
  5. Follow the instructions to enter the App Password. The App Password is the 16-character code in the yellow bar on your device.
  6. Tap Done.

(from: https://support.google.com/accounts/answer/185833?hl=en)

Now simply go to online accounts and use that newly-created password to authenticate.

  • I tried all the steps as suggested. - Turned on 2-step verification. - Generated the app password. Inserted the 16 digit app password as the password for Gmail in Elementary Mail app. Still I am getting the sign in issues. Am I doing sth wrong?
    – Vishal
    Aug 12, 2021 at 14:45
  • No idea. :( Are you using the whole email address (with the @gmail part)? Perhaps try another way. Aug 12, 2021 at 16:28
  • Yes, for username I am using [email protected].
    – Vishal
    Aug 12, 2021 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.