I have enabled my POP and IMAP but still it is throwing an error while logging in to gmail account...Here is my code
import smtplib
host="smtp.gmail.com"
port=587
username="bilalgcu29@gmail.com"
password="xyz"
connection = smtplib.SMTP(host,port)
connection.ehlo()
connection.starttls()
connection.login(username,password)
The error is raise SMTPAuthenticationError(code, resp) smtplib.SMTPAuthenticationError: (534, b'5.7.14 ....)