- Open Gmail account
- Go to gmail dashboard
- Click on gear icon which is displaying right corner
- Click on "See All Settings"
- Chose option "Forwarding and POP/IMAP"
- Enable "IMAP access"
- Open Gmail Security Settings
- Click on "Google Account" which is displaying right corner
- Select "Security" Option in the left menu
- Search "App passwords" and generate code