0👍
✅
It was just a typo in the settings.py
file’s line which specify a SMTP host: EMAIL_HOSTS = 'smtp.gmail.com'
instead of EMAIL_HOST = 'smtp.gmail.com'
. So Django used the default EMAIL_HOST
parameter – localhost
and was failing to connect. Thanks people in comments that tried to help me.
1👍
it helped me to add in settingd.py:
RECIPIENTS_EMAIL = ['manager@mysite.com'] # замените на свою почту
DEFAULT_FROM_EMAIL = 'admin@mysite.com' # замените на свою почту
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
- [Answered ]-Why does the js function need to be inside the html file and cannot be separates in this case?
- [Answered ]-Django {% url %} template looping
- [Answered ]-How to give permission to admin and author for view specific page in django?
- [Answered ]-Django modelchoicefield select columns
Source:stackexchange.com