Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29748

I'm getting an SSL Error when sending email via Django

$
0
0
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:852)

This is what I see in the error log whenever I run my Django webpage. I'm hosting it with Apache. On the page I see a 500: Internal Server Error.

My Email config is as follows:

#Email settings
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'outlook.office365.com'
EMAIL_USE_SSL = True
EMAIL_PORT = 587
EMAIL_HOST_USER = '****@**************.com'
EMAIL_HOST_PASSWORD = '********'

and my send_mail code is as follows:

send_mail(
    'Subject here',
    'Here is the message.',
    '***************@**************.com',
    ['****@**************.com'],
    fail_silently=False,
    )

Viewing all articles
Browse latest Browse all 29748

Trending Articles