Use an App Password instead of your regular email password. To get an App Password:
- Go to your Google Account
- Click on "Security"
- Under "Signing in to Google," select "App Passwords"
- At the bottom, choose "Select app" and pick the app you're using
- Choose "Select device" and pick the device you're using
- Select "Generate"
- Copy and paste the 16-character code
Note: You need 2-Step Verification enabled on your Google Account to use App Passwords.Do the same for Outlook.