python - Password Reset-Sending mail doesnt work -


setting.py-  email_backend = "mailer.backend.dbbackend" email_subject_prefix = "[.....]"  email_host          = 'smtp.gmail.com' email_host_password = 'tester@@abcd' email_host_user     = 'tester.abcd@gmail.com' email_port          = 587 email_use_tls       = true  default_from_email  = 'tester.abcd@gmail.com' default_admin_email  = 'tester.abcd@gmail.com' temporary_cc_email = 'tester.abcd@gmail.com' contactus_email = 'tester.abcd@gmail.com' jobapply_email = 'tester.abcd@gmail.com'  urls.py:  urlpatterns = patterns('django.contrib.auth.views',  url(r'^password-reset/$', 'password_reset', {       'template_name': 'profiles/password_reset_form.html',     'password_reset_form': passresetform   }, name='password-reset'),  url(r'^password-reset-process/$', 'password_reset_done', {     'template_name': 'profiles/password_reset_done.html',   }, name='password-reset-done'),  url(r'^password-reset-confirm/(?p<uidb36>[0-9a-za-z]{1,13})-(?p<token>.+)/$',     'password_reset_confirm',     {'template_name': 'profiles/password_reset_confirm.html',},     name='password-reset-confirm'),  url(r'^password-reset-complete', 'password_reset_complete', {     'template_name': 'profiles/password_reset_complete.html',   }, name='password-reset-complete'), 

this code wheni enter mail , click submit correctly redirects next page mail not send,is there pblm code

you should start testing if problem comes code or email backend.

here how setup django console email backend:

email_backend = 'django.core.mail.backends.console.emailbackend' 

this should output emails in console when running server on local dev machine python manage.py runserver.

if emails printed correctly console, there wrong configuration either here:

email_host          = 'smtp.gmail.com' email_host_password = 'tester@@abcd' email_host_user     = 'tester.abcd@gmail.com' email_port          = 587 email_use_tls       = true 

or here:

email_backend = "mailer.backend.dbbackend" 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -