Notification error
Closed this issue · 8 comments
Oh... :)
When I added 'registration.contrib.notification' in INSTALLED_APP, I get this:
Environment:
Request Method: POST
Request URL: http://127.0.0.1:8000/registration/register/
Django Version: 1.5.1
Python Version: 2.7.3
Installed Applications:
('admin_tools',
'admin_tools.theming',
'admin_tools.menu',
'admin_tools.dashboard',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'registration',
'registration.contrib.notification',
'supplementtut',
'katdata')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
-
File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in view
response = callback(request, _callback_args, *_callback_kwargs)
-
File "/home/djfile/django-inspectional-registration-master/registration/views.py" in dispatch
return self.dispatch(request, _args, *_kwargs)
-
File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in dispatch
return super(RegistrationView, self).dispatch(request, _args, *_kwargs)
-
File "/home/djfile/django-inspectional-registration-master/registration/views.py" in post
return handler(request, _args, *_kwargs)
-
File "/home/djfile/django-inspectional-registration-master/registration/views.py" in form_valid
return self.form_valid(form, supplement_form)
-
File "/home/djfile/django-inspectional-registration-master/registration/backends/default/init.py" in register
self.new_user = self.backend.register(username, email, self.request)
-
File "/usr/local/lib/python2.7/dist-packages/django/dispatch/dispatcher.py" in send
request=request,
-
File "/home/djfile/django-inspectional-registration-master/registration/contrib/notification/init.py" in send_notification_email_reciver
response = receiver(signal=self, sender=sender, **named)
-
File "/home/djfile/django-inspectional-registration-master/registration/utils.py" in send_mail
send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, recipients)
-
File "/usr/local/lib/phon2.7/dist-packages/django/core/mail/init.py" in send_mail
return django_send_mail(subject, message, from_email, recipients)
-
File "/usr/local/lib/python2.7/dist-packages/django/core/mail/message.py" in send
connection=connection).send()
-
File "/usr/local/lib/python2.7/dist-packages/django/core/mail/backends/smtp.py" in send_messages
return self.get_connection(fail_silently).send_messages([self])
-
File "/usr/local/lib/python2.7/dist-packages/django/core/mail/backends/smtp.py" in _send
sent = self._send(message)
-
File "/usr/lib/python2.7/smtplib.py" in sendmail
force_bytes(message.as_string(), charset))
-
raise SMTPRecipientsRefused(senderrs)
Exception Type: SMTPRecipientsRefused at /registration/register/
Exception Value: {u'a': (553, "5.1.2 We weren't able to find the recipient domain. Please check for any\n5.1.2 spelling errors, and make sure you didn't enter any spaces, periods,\n5.1.2 or other punctuation after the recipient's email address. 3sm8467822lbr.0 - gsmtp"), u'o': (553, "5.1.2 We weren't able to find the recipient domain. Please check for any\n5.1.2 spelling errors, and make sure you didn't enter any spaces, periods,\n5.1.2 or other punctuation after the recipient's email address. 3sm8467822lbr.0 - gsmtp")}yt
Did you check this? https://django-inspectional-registration.readthedocs.org/en/latest/faq.html#help-email-have-not-been-sent-to-the-user
It sounds like your Email setting is wrong. Because the 'notification' and 'autologin' is activated in django-inspectional-registration test project and I think you could use the test project.
Yes, I check it...
DEFAULT_FROM_EMAIL - admin email?
Yes. But I guess if you are using Gmail then the DEFAULT_FROM_EMAIL should be that email address or end with @gmail.com
(I'm not sure)
Yes, I using gmail.
Not work.
In debug output in send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, recipients)
recepients = frozenset(['a', 'o'])
May be a problem in this?
How did you write ADMINS
or MANAGERS
in your settings.py
? Is it looked like the below?
ADMINS = (
('Alisue', 'lambdalisue@hashnote.net'), # DO NOT FORGET TRAILING COMMA!
)
MANAGERS = ADMINS
recepients = frozenset(['a', 'o'])
is quite strange.
Yes! All works!
Thanks a lot.
You are welcome :)