How looks .env in Django secret key - Gmail

Hello guys, I don’t know what to do anymore. I am trying to use the environment from the render.
secret file. My file name is .env and Contents two values: EMAIL_HOST_USER=values
EMAIL_HOST_PASSWORD=values and in my settings.py I have installed and imported this library, import environ, import os, and try to use google email, but I still get an issue:
Do you know where can be a problem? thank you

EMAIL_BACKEND = ‘django.core.mail.backends.smtp.EmailBackend’
EMAIL_USE_TLS = True
EMAIL_HOST = ‘smtp.gmail.com
EMAIL_HOST_USER = os.environ.get(‘EMAIL_HOST_USER’)
EMAIL_HOST_PASSWORD = os.environ.get(‘EMAIL_HOST_PASSWORD’)
EMAIL_PORT = 587

SMTPSenderRefused at /signup/

(530, b’5.7.0 Authentication Required. Learn more at\n5.7.0 Check Gmail through other email platforms - Gmail Help f23-20020a7bc8d7000000b003e7f1086660sm2955217wml.15 - gsmtp’, ‘webmaster@localhost’)

Hi there,
This is going to probably be an application issue - usually, the error returned by Google includes a link with a way to resolve, if I recall it’s probably an application specific password for the Gmail login.

Regards,

John B

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.