我无法让内置的Django Password-reset工作。我正在尝试使用我的Gmail帐户对其进行测试,但我在/ resetpassword /得到错误10060.// p>
我的网址:
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'),
我的设置:
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'
我在防火墙中打开了端口25。
有什么想法吗?我可能忘记了其他设置?谢谢你的回答!
编辑:
EMAIL_PORT = 587正在运作!