ask / chishop

Please use https://github.com/benliles/chishop
https://github.com/benliles/djangopypi
BSD 3-Clause "New" or "Revised" License
175 stars 116 forks source link

django registration requires smtp server? #14

Open nicferrier opened 13 years ago

nicferrier commented 13 years ago

When I try and register with chishop I get a failure:

Traceback: File "/home/nferrier/chishop/parts/django/django/core/handlers/base.py" in get_response

  1. response = callback(request, _callback_args, *_callback_kwargs) File "/home/nferrier/chishop/eggs/django_registration-0.8_alpha_1-py2.6.egg/registration/views.py" in register
  2. new_user = backend.register(request, form.cleaned_data) File "/home/nferrier/chishop/eggs/django_registration-0.8_alpha_1-py2.6.egg/registration/backends/default/init**.py" in register
  3. password, site) File "/home/nferrier/chishop/parts/django/django/db/transaction.py" in _commit_on_success
  4. res = func(_args, *_kw) File "/home/nferrier/chishop/eggs/django_registration-0.8_alpha_1-py2.6.egg/registration/models.py" in create_inactive_user
  5. registration_profile.send_activation_email(site) File "/home/nferrier/chishop/eggs/django_registration-0.8_alpha_1-py2.6.egg/registration/models.py" in send_activation_email
  6. self.user.email_user(subject, message, settings.DEFAULT_FROM_EMAIL) File "/home/nferrier/chishop/parts/django/django/contrib/auth/models.py" in email_user
  7. send_mail(subject, message, from_email, [self.email]) File "/home/nferrier/chishop/parts/django/django/core/mail.py" in send_mail
  8. connection=connection).send() File "/home/nferrier/chishop/parts/django/django/core/mail.py" in send
  9. return self.get_connection(fail_silently).send_messages([self]) File "/home/nferrier/chishop/parts/django/django/core/mail.py" in send_messages
  10. sent = self._send(message) File "/home/nferrier/chishop/parts/django/django/core/mail.py" in _send
  11. email_message.message().as_string()) File "/usr/lib/python2.6/smtplib.py" in sendmail
  12. self.ehlo_or_helo_if_needed() File "/usr/lib/python2.6/smtplib.py" in ehlo_or_helo_if_needed
  13. if not (200 <= self.ehlo()[0] <= 299): File "/usr/lib/python2.6/smtplib.py" in ehlo
  14. self.putcmd(self.ehlo_msg, name or self.local_hostname) File "/usr/lib/python2.6/smtplib.py" in putcmd
  15. self.send(str) File "/usr/lib/python2.6/smtplib.py" in send
  16. raise SMTPServerDisconnected('please run connect() first')

Exception Type: SMTPServerDisconnected at /accounts/register/ Exception Value: please run connect() first

<<<<<<

I don't have an SMTP server configured in Django, not sure how to set one up either...

This:

http://code.google.com/p/app-engine-patch/issues/detail?id=211

suggests the problem can be fixed with an option to runserver, but the runserver chishop builds does not have that option (as far as I can see).

Maybe other authentication systems would be better anyway since this will mostly be used for team and personal servers?

bassdread commented 13 years ago

https://github.com/isotoma/FakeEmail provides a fake email server and gives you access to the emails that would have been sent using a web interface. Worth checking out as a temporary solution.