IOError when trying to send email in Django app
I have a Django app running on a server with uWSGI and nginx.
In my local_settings.py
file I have this:
###############
# EMAIL SETUP #
###############
EMAIL_HOST = 'smtp.privateemail.com'
EMAIL_HOST_USER = 'support@richblockspoorblocks.com'
EMAIL_HOST_PASSWORD = 'MY EMAIL PASSWORD'
EMAIL_PORT = 587
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
########################
# OTHER EMAIL SETTINGS #
########################
ADMIN_EMAIL = "admin@richblockspoorblocks.com"
SUPPORT_EMAIL = "support@richblockspoorblocks.com"
When I fill out the /password_reset/
template with an email and submit the form, the email I enter gets no email.
I see these lines in my uwsgi.log
file after I submit the password reset form.
Fri May 11 17:48:10 2018 - SIGPIPE: writing to a closed pipe/socket/fd (probably the client disconnected) on request /password_reset/ (ip 73.49.35.42) !!!
Fri May 11 17:48:10 2018 - uwsgi_response_write_headers_do(): Broken pipe [core/writer.c line 248] during POST /password_reset/ (73.49.35.42)
IOError: write error
What error is this? Why won't the password reset email send?
2 Replies
aorme
Linode Staff
I'm not really sure -- have you tried using port 465 instead?
Also, is it possible this is failing for a reason other than not sending mail? Is Django able to connect to your database?
Changing the port number got rid of the error.