Note: To avoid temporarily locking yourself out of your account, make sure you don't exceed 2500 MB per day for IMAP downloads and 500 MB per day for IMAP uploads. If you're setting up a single IMAP account on multiple computers, try taking a break between each setup.
- On your computer, open Gmail.
- In the top right, click Settings .
- Click Settings.
- Click the Forwarding and POP/IMAP tab.
- In the "IMAP access" section, select Enable IMAP.
- Click Save Changes.
More info
- Go to your Google Account.
- On the left navigation panel, click Security.
- On the Less secure app access panel, click Turn on access.
Turn on 2-Step Verification
Note: App Passwords can only be used with accounts that have 2-Step Verification turned on.
- Go to your Google Account.
- On the left navigation panel, click Security.
- On the Signing in to Google panel, click 2-Step Verification.
- Click Get started.
- Follow the steps on the screen.
Choose a second verification step
When you set up 2-Step Verification, you can choose your second verification step:
More info
Create & use App Passwords
- Go to your Google Account.
- On the left navigation panel, choose Security.
- On the "Signing in to Google" panel, choose App Passwords. If you don’t see this option:
- 2-Step Verification is not set up for your account.
- 2-Step Verification is set up for security keys only.
- Your account is through work, school, or other organization.
- You’ve turned on Advanced Protection for your account.
- At the bottom, choose Select app and choose the app you’re using.
- Choose Select device and choose the device you’re using.
- Choose Generate.
- Follow the instructions to enter the App Password. The App Password is the 16-character code in the yellow bar on your device.
- Choose Done.
Most of the time, you’ll only have to enter an App Password once per app or device, so don’t worry about memorizing it.
More info
Note: To help protect your account, your app passwords are revoked when you change your Google Account password. You can always create a new app password to continue using an app with your Google Account.
You might need to provide the following details:
Your Account information
Full name or display name: Your name
Account Name, User name, or Email address: Your full email address
Password: Your Gmail password
Incoming mail settings
Server: imap.gmail.com
Require SSL: Yes
Port: 993
Outgoing mail
Server: smtp.gmail.com
Require SSL: Yes
Require TLS: Yes
Require authentication: Yes
Port for SSL: 465
Port for TLS/STARTTLS: 587
Source: https://support.google.com/mail/answer/185833?hl=en