Can't send letters through SSL trying in console
listing:
from django.core.mail import EmailMultiAlternatives
subject, from_email, to = 'hello', 'no-reply@domain.ru', 'to@gmail.com'
text_content = 'This is an important message.'
html_content = '<p>This is an <strong>important</strong> message.</p>'
msg = EmailMultiAlternatives(subject, text_content, from_email, [to])
msg.attach_alternative(html_content, "text/html")
msg.send()
settings:
EMAIL_HOST = 'smtp-pulse.com'
EMAIL_PORT = 465
EMAIL_HOST_USER = 'login'
EMAIL_HOST_PASSWORD = 'password'
EMAIL_USE_SSL = True