I tried to add an app password for my gmail following Google Gmail Help https://support.google.com/mail/answer/185833?hl=en&sjid=2565285338845314707-AP
Create & use app passwords Important: To create an app password, you need 2-Step Verification on your Google Account.
If you use 2-Step-Verification and get a "password incorrect" error when you sign in, you can try to use an app password.
- Go to your Google Account.
- Select Security.
- Under "How you sign in to Google," select 2-Step Verification.
- At the bottom of the page, select App passwords.
- Enter a name that helps you remember where you’ll use the app password.
- Select Generate.
- To enter the app password, follow the instructions on your screen. The app password is the 16-character code that generates on your device.
- Select Done.
I was told that 2-step verification is required for the app password to be effective. However, I received no 2-step verification after the app password has been done (point 8). I would appreciate it if someone could help me understand why 2-step verification was not prompted in my case. (Note: This app password is to be hardcoded using in our mass email sending python program. Here is the error after I have input the app password in the program : smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. For more information, go to\n5.7.8 https://support.google.com/mail/?p=BadCredentials e28-20020a63545c000000b005cf5bf78b74sm2151276pgm.17 - gsmtp')
Thank you for all your help!
(Note: I expect the mass email can go through to the intended recipients without error.)