Filed to send mail via send_mail Django Function

software development

#1

Hi, I am trying to send mail from my website.
Here is my settings py:
EMAIL_HOST = 'mail.mydomain.ru
EMAIL_HOST_USER = ‘name@mydomain.ru’'
EMAIL_HOST_PASSWORD = 'pass’
EMAIL_PORT = 587
(credentials are correct, them work from PHP-script), telnet to smtp server works fine.
But when I launch my script form my developer machine, or from dreamhost server I get
Exception Type: error

Exception Value: (10054, ‘Connection reset by peer’)
Exception Location: \python\Lib\socket.py in readline, line 346

send_mail(subject, message, FEEDBACK_EMAIL, FEEDBACK_EMAIL)

How can I fix it?