Error sending email: raise SMTPAuthenticationError(code, resp)

前端 未结 4 541
甜味超标
甜味超标 2021-01-05 07:12

Im trying to send emails with smtp module, but Im having an error:

File \"/usr/lib/python2.7/smtplib.py\", in login    
 raise SMTPAuthenticationError(code,          


        
4条回答
  •  有刺的猬
    2021-01-05 07:57

    Go to Google's Account Security Settings: www.google.com/settings/security

    Find the field "Access for less secure apps". Set it to "Allowed".

    Try your script again, changing server.sendemail() to server.sendmail()

提交回复
热议问题