0

I have tried everything I could find online, nothing worked.

Everything works fine on the django dev server, but as soon as I deploy to production (uwsgi + nginx), it does not work anymore.

The full error is: (535, '5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/answer/14257 uq7sm34020500wjc.19 - gsmtp')

Config:

EMAIL_HOST = 'smtp.gmail.com'                                                                                                                                                                                                     
EMAIL_HOST_USER = environ['FEEDBACK_EMAIL']                                                                                                                                                                                       
EMAIL_HOST_PASSWORD = environ['FEEDBACK_EMAIL_PASSWORD']                                                                                                                                                                          
EMAIL_PORT = 587                                                                                                                                                                                                                  
EMAIL_USE_TLS = True                                                                                                                                                                                                                                                                                                                                                                                                                                                
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER 

The user and password are definitely set correctly.

I have tried:

  1. Allowing access to unsecure apps @gmail.

  2. Setting up 2-way auth and setting an app password for the EMAIL_HOST_PASSWORD

  3. Going to https://accounts.google.com/DisplayUnlockCaptcha. Since the server is on a linux box, I used a SSH Proxy Tunneling with Chrome, so I could access the account from the servers IP.

  4. Probably every suggestion I could find on the first 5 google search result pages.

Any thoughts?

  • Post the full traceback. Posting just the error message doesn't tell us where the error came from. Also, have you looked at the "Learn more" link in the error message? Does any of that apply to you? – John Gordon Jun 14 '16 at 18:35
  • can you check logging your EMAIL_HOST_USER & EMAIL_HOST_PASSWORD if they are being correct set in your environment and is being read correctly by your setting times, Also most of the time we make change to the environment variable and forget to restart uwsgi to make the setting to take effect. Can you check those stuff. Also if possible can you share the full log as well. – Vikalp Jain Jun 14 '16 at 20:31

0 Answers0