How do I send emails through gmail via app passwords?

Question:

When trying to send an email with python through gmail, I need an app password. How would I set this up to send an email with python?

Asked By: Owen Griffin

||

Answers:

Apps passwords can be used to login to googles smtp server you need to have 2fa enabled on your google account in order to create an apps password.

Google has not disabled apps passwords, they have disabled less secure apps.

Simply create an apps password and use it in place of your standard gmail password in your code. Quick fix for SMTP username and password not accepted error

How to create a Apps Password for connecting to Google’s SMTP server.

Answered By: DaImTo
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.