[Answer]-Django registration [Errno 10013] error

1πŸ‘

βœ…

The problem has to do with your email server setup. Instead of figuring out what to fix, just set your EMAIL_BACKEND in settings.py to the following:

if DEBUG:
    EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

This way, any email sent by django will be shown in the console instead of attempting delivery. You can then continue developing your application.

Having emails printed on the console is good if you are developing, but it can be a headache if your application is sending a lot of emails across.

A better solution is to install mailcatcher. This application will create a local mail server for testing and as a bonus, provide you a web interface where you can view the emails being sent by your server:

mailcatcher

It is a Ruby application, and as you are on Windows, I would suggest using rubyinstaller to help with gem installation.

The website also shows you how to configure django:

if DEBUG:
    EMAIL_HOST = '127.0.0.1'
    EMAIL_HOST_USER = ''
    EMAIL_HOST_PASSWORD = ''
    EMAIL_PORT = 1025
    EMAIL_USE_TLS = False
πŸ‘€Burhan Khalid

0πŸ‘

This has nothing to do with your webserver ports, this is to do with the host and port that smtplib is trying to open in order to send an email.

These are controlled by settings.EMAIL_HOST and settings.EMAIL_PORT. There are other settings too, see the documentation for details on how to set up email properly.

Leave a comment