Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
567 views
in Technique[技术] by (71.8m points)

python - Django SMTPAuthenticationError

I am new in django and developing a web application using django. I have successfully set the Signup functionality using Userena in my web application and can Register as a user with Verification Email. I can show you my SMTP settings in my settings.py file

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = '[email protected]'
DEFAULT_FROM_EMAIL = '[email protected]'
SERVER_EMAIL = '[email protected]'
EMAIL_HOST_PASSWORD = '**************'

everything was fine before i have changed my EMAIL_HOST_PASSWORD

Infact, for some reason I have to change the previous password of that SERVER_EMAIL([email protected]). I have already edit the EMAIL_HOST_PASSWORD according to the new SERVER_EMAIL password.

but now, if I want to register as a new user, I am facing the following error

SMTPAuthenticationError at /accounts/signup/
(534, '5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbvNq
5.7.14 S3l1pFXENupDa_SdPphNHrnzeLPUOyf6O0l1s31w7h_UARx11P89AxPeeZ6xBi2KeQRjsw
5.7.14 nvpxZhPVv771W9ljEDyeWnqpqv3_nakuPo36BEl3IlYj9qVujNB5cm0TYFf9LQAxRjFdda
5.7.14 xh-y5spA9zIQONDsvRRgN3e0DXoIkgxTO3Mu75IaACi-XlvFtFfPBiQ81gUrBZ_PhZsBmh
5.7.14 ajsSf-flNEmoSydyOTNdmwdB0__8> Please log in via your web browser and
5.7.14 then try again.
5.7.14 Learn more at
5.7.14 https://support.google.com/mail/bin/answer.py?answer=78754 40sm12125121qgi.47 - gsmtp')
Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

A relatively recent change in Google's authentication system means you're going to have to "allow less secure app access" to your Google account, in order for this to work.

In your error, you are recommended to visit this link: https://support.google.com/mail/answer/78754

On that page:

Step #2 asks you to try Displaying an Unlock Captcha

Step #3 explains how to allow less secure app access. In summary:

Go to Allow less secure apps and choose "Allow" to let less secure apps access your Google account. We don't recommend this option because it may make it easier for someone to gain access to your account.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...