Answer the question
In order to leave comments, you need to log in
Do not log in to mail.ru account to send emails via SMTP Django3?
Code in views.py
from django.conf import settings
from django.core.mail import send_mail
send_mail('Заголовок письма', 'Текст письма', settings.EMAIL_HOST_USER, ['почта@yandex.ru'], auth_user=settings.EMAIL_HOST_USER, auth_password=settings.EMAIL_HOST_PASSWORD)
EMAIL_HOST = 'smtp.mail.ru'
EMAIL_PORT = 465
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'пароль'
EMAIL_USE_TLS = False
EMAIL_USE_SSL = True
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question