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 = 'primer-2022@mail.ru'
EMAIL_HOST_PASSWORD = 'пароль'
EMAIL_USE_TLS = False
EMAIL_USE_SSL = True