I have created a Django app and deployed on to Heroku. I have a view which sends invitation to a new person. Everything is working fine on the local machine. After I deployed it on to Heroku with
DEBUG=FASLE
in setttings.py
I'm getting an error Server Error (500)
here is what i have added in my settings.py file
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST_USER = 'youremail@gmail.com'
EMAIL_HOST_PASSWORD = 'yourpwd'
# lesssecureappas - https://myaccount.google.com/u/2/lesssecureapps?utm_source=google-account&utm_medium=web
# cpatcha -- https://accounts.google.com/b/0/DisplayUnlockCaptcha
EMAIL_SUBJECT_PREFIX = 'test'
SERVER_EMAIL = EMAIL_HOST_USER
I have even allowed access to captcha and less secure apps.
It is working fine for 24 hours on production when I grant access. The very next day it is rasing the same error. How to approach this issue. I have hardcoded the values instead of variables. Please suggest any ideas?