简体   繁体   中英

Django Password Reset Email Error 10060

I can't get the built in Django Password-reset to work. I'm trying to test it with my Gmail-account but I'm getting an Error 10060 at /resetpassword/.

My urls:

url(r'^resetpassword/passwordsent/$', 'django.contrib.auth.views.password_reset_done'),
url(r'^resetpassword/$', 'django.contrib.auth.views.password_reset'),
url(r'^reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm'),
url(r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete'),

My settings:

EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 25
EMAIL_HOST_USER = 'myemail@gmail.com'
EMAIL_HOST_PASSWORD = 'mypassword'
EMAIL_USE_TLS = True
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

I've opened port 25 in the Firewall.

Any ideas? Other settings i might have forgotten? Thank you for your answers!

EDIT:

EMAIL_PORT = 587 is working!

It appears that your port is wrong - you will need to use port 465 instead of port 25.

This help article indicates that you should be using port 465 with SSL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM