Python - Connect To Gmail And Send Mail - Error 534 Invalidsecondfactor
i want to include sending notifications mails through gmail in my python code. I followed all the steps to do it: import smtplib Enable less secure app Wait for 1 day Set 2-ver
Solution 1:
gmail port is 587
you are using AT&T port 465 just replace with 587port .
Solution 2:
The problem is that the "2-Step Verification" is on your account.
Solutions:
- Turn off 2-Step Verification and use your normal password account in your app (see this link for more details)
- Sign in with App Passwords, An App Password is a 16-digit passcode that gives a less secure app or device permission to access your Google Account. App Passwords can only be used with accounts that have 2-Step Verification turned on (see this link or link2).
Post a Comment for "Python - Connect To Gmail And Send Mail - Error 534 Invalidsecondfactor"