Django – [Errno 111] Connection refused

Looks like you are trying to send a mail (send_mail()) and your mail settings in your are not correct.

You should check the docs for sending emails.

For debugging purposes you could setup a local smtpserver with this command:

python -m smtpd -n -c DebuggingServer localhost:1025

and adjust your mail settings accordingly:

EMAIL_HOST = 'localhost'

This is documented here: Testing e-mail sending

As an alternative to starting a dedicated debugging server you could use the console.EmailBackend which was added to Django recently.

Leave a Comment