How to Create an App Password for Gmail
If you use 2-Step-Verification and are seeing a “password incorrect” error when trying to access your Google Account, an App password may solve the problem. An App Password is a 16-digit passcode that gives an app or device restricted access to your Google Account without having to divulge your personal password and complete access to your Google Account.
1. Add an App Password
Note: Google now requires that you have 2-Step-Verification enabled before you can set up an application password.
Visit your App passwords page. You may be asked to sign in to your Google Account.
Note: If you are seeing a message “The setting that you are looking for is not available for your account.” you should enable 2-Step-Verification first.
In the Select app dropdown menu, choose the app you’re using. You can also select Other and enter you own custom app name.
In the Select device dropdown menu, choose the device you’re using. You can also select Other and enter you own custom device name.
What you select in these dropdowns actually has no bearing on the functionality of the app password. They are just used for your own guide and for Google to show you the appropriate instructions in the next step.
In the Generated app password modal, copy your 16-digit password and paste it into your application.
After you’ve clicked done, you won’t see that App password code again. If you ever lose your app password, you can just generate a new one following the above steps.
You should now see a list of apps and devices you’ve created App passwords for.
Now set gmail smtp configuration
Smtp Address : smtp.gmail.com
Smtp Port: 587
Smtp Username: Your Gmail Email
Smtp Password: Password is which you generate app password
Enable SSL: True