'Django won't send password-reset email on remote server, works on local machine

I'm running a Django project on a remote server with nginx and uwsgi. In my local_settings.py I have this:

###############
# EMAIL SETUP #
###############
ADMIN_EMAIL = "[email protected]"
SUPPORT_EMAIL = "[email protected]"
DEFAULT_FROM_EMAIL = SUPPORT_EMAIL
SERVER_EMAIL = SUPPORT_EMAIL
EMAIL_HOST = 'mail.privateemail.com'
EMAIL_HOST_USER = DEFAULT_FROM_EMAIL
EMAIL_HOST_PASSWORD = 'my password here'
EMAIL_PORT = 465
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True

When I fill out and submit the form in Django's password_reset template, no email gets sent. Instead I see this in uwsgi.log.

MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Subject: Password reset on Default
From: webmaster@localhost
To: [email protected]
Date: Wed, 16 May 2018 16:55:23 -0000
Message-ID: <[email protected]>



Hello,

You received this email because a request was made to reset the password.


If you requested this, go to the following page and choose a new password: https://127.0.0.1:8000/reset/MQ/4w8-0373d185ce41dcdb0b63/

Your username: [email protected]

Thank you.



-------------------------------------------------------------------------------

When I fillout the form and submit it when running my Django project on my local machine, I actually get an email at the gmail account specified.

What's going on here?



Solution 1:[1]

Solved! The problem was with DisplayUnclockCaptcha Settings for my Google Account.

Make sure that is enabled here - https://accounts.google.com/b/0/DisplayUnlockCaptcha

The above solution did work for me.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 rajat prakash