Due to tightened security measures applied by Google to 3rd party mobile apps, you'll need to generate the unique "app password" in Gmail's account settings. Please find the instructions below.
First, you need to make sure that IMAP is enabled on your account:
- Open Gmail on your desktop and sign in.
- In the top right, click Settings ("GEAR" icon) and then See all settings.
- Click the Forwarding and POP/IMAP tab.
- In the "IMAP Access" section, select Enable IMAP
At the bottom of the page, click Save Changes.
Second, you need to generate "App Password" from your Google account settings:
IMPORTANT: App Passwords can only be used with accounts that have 2-Step Verification turned on.
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:
a. 2-Step Verification is not set up for your account.
b. 2-Step Verification is only set up for security keys.
c. Your account is through work, school, or other organizations.
d. You turned on Advanced Protection.
4. At the bottom, choose Select app and choose the app you using. Select "Device" and select the device you're using, then click 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.
More information can be found in Google Help Center: https://support.google.com/mail/answer/185833