I'm trying to set up my Django account to receive the Error reporting (docs here).
I have added ADMINS
to my settings.py
. Then, as per the documentation:
In order to send email, Django requires a few settings telling it how to connect to your mail server. At the very least, you’ll need to specify EMAIL_HOST and possibly EMAIL_HOST_USER and EMAIL_HOST_PASSWORD, though other settings may be also required depending on your mail server’s configuration. Consult the Django settings documentation for a full list of email-related settings.
But here is when I get lost. I have a Business Gmail account, which is the one I would like to link here. This post was explaining it wonderfully,
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'myemail@mydomain.com'
EMAIL_HOST_PASSWORD = 'mypassword'
but it says:
In 2016 Gmail is not allowing this anymore.
Apparently, the problem is in the EMAIL_HOST_PASSWORD
setting, which has to be an specific password, as noted in this other post.
However, it is hard to believe that Gmail does not allow that in any way, especially with a Business account where you are paying money for the service.
Unfortunately, all related info I found is older than 2016 and therefore not useful anymore.
Is there a way to connect the Django app with Gmail?
The work-around that eventually worked for me was to create a new Gmail account just for this purpose. This works for the moment, despite some comments I read somewhere else saying the contrary.
Note that this new account will be without two-step verification, but security is not such a big concern as the account will "only" deal with Django emails.