[ad_1]
I new to programming and/or web development.
I am trying to send email using python. My code was working just FINE before google decides to disable ‘secure secure apps’. Please HELP. Thanks a ton in advance
server = smtplib.SMTP_SSL("smtp.gmail.com", 465)
serverEmail = "EMAILADDRESS"
serverPw = "QWERTY"
server.login(serverEmail, serverPw)
subject = "Rejection"
body = "Hi! You've been unfortunately declined access to our system."
message = f'Subject: {subject}\n\n{body}'
server.sendmail("EMAILADDRESS", doctorEmail['email'], message)
server.quit()
I get this error now
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted.
I get this error when i use: server.starttls()
smtplib.SMTPNotSupportedError: STARTTLS extension not supported by server.
[ad_2]