26👍
✅
Your gmail.smtp
setup is correct. It looks like you are not calling the send_email
function correctly, and that’s why it’s not sending. In the python shell, try the following:
import django
from django.conf import settings
from django.core.mail import send_mail
send_mail('Subject here', 'Here is the message.', settings.EMAIL_HOST_USER,
['to@example.com'], fail_silently=False)
2👍
Try to change EMAIL_USE_TLS=True to EMAIL_USE_SSL=True and EMAIL_PORT=465
- [Django]-PyCharm: DJANGO_SETTINGS_MODULE is undefined
- [Django]-Django error: got multiple values for keyword argument
- [Django]-Django: For Loop to Iterate Form Fields
Source:stackexchange.com