So I was trying to send a basic email with python with the folllowing code but it gives me an error sugesting I sign in using a browser . I did it and it stil spit out the same error. The code:
import smtplib
server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login("projtig6@gmail.com", "redacted")
msg = "Your security system has detected an intrusion of some kind please refere to http://projetotig6.orgfree.com/ for an image of the current situation"
server.sendmail("projtig6@gmail.com", "grenskul@gmail.com", msg)
server.quit()
And it gives me this when I run it
user@ubuntu:~/Desktop$ python3 tent.py
Traceback (most recent call last):
File "tent.py", line 5, in <module>
server.login("projtig6@gmail.com", "redacted")
File "/usr/lib/python3.4/smtplib.py", line 639, in login
raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (534, b'5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbtT\n5.7.14 NJKUGchcZYhLMqcl9utRyvWa6jwkzOCuhBtdP3URW63HNIVrSlue8To8yKxxbDIwvlnO2g\n5.7.14 V2GooN21jsn0X8_d6W_CxGwuOXmBrkoDzFCqqbB72xz3MbY0Kj3Z7ZzdXlQCc8sjdavwes\n5.7.14 bUlIhA8GIqRKJAyBbildXtsSqF8Fh_7AYPI0W3SKlidhoUOK7o4hI0IIUmgVdqOCpFpxyU\n5.7.14 fvShqxoTn6W_bAWqXfS5akND40-gQ> Please log in via your web browser and\n5.7.14 then try again.\n5.7.14 Learn more at\n5.7.14 https://support.google.com/mail/answer/78754 c142sm10923092wme.18 - gsmtp')