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:
Allowing access to unsecure apps @gmail.
Setting up 2-way auth and setting an app password for the EMAIL_HOST_PASSWORD
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.
Probably every suggestion I could find on the first 5 google search result pages.
Any thoughts?