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,
)
This error occurs when you are not using the correct port number.
You can search for SMTP settings of your email service on google.
Kindly check for the correct port number of your email service.