- Go to your Google Account.
- Click on the Security tab.
- Under Signing in to Google, click on 2-Step Verification.
- Click on App passwords.
- Enter a name for your app password. This will help you remember which app you created the password for.
- Click on Generate.
- The app password will be generated and displayed on the screen.
- Copy the app password and save it in a safe place. You will need it to authenticate your Python script when you send an email.
Here are some additional things to keep in mind when creating an app password:
- You can create app passwords for any app that needs to access your Gmail account.
- App passwords are different from your regular Gmail password. They are shorter and easier to remember.
- You should not share your app password with anyone.
- If you lose your app password, you can generate a new one from the App passwords page.