Not able to send email Net::ReadTimeout

Has anyone found a solution? Yandex does not work with ports 465 and 567. But does the curl work correctly.

root@server-app:/var/www/discourse# curl --url 'smtps://smtp.yandex.ru:465' --ssl-reqd \
--mail-from '...' --mail-rcpt '...' \
--upload-file mail1.txt --user 'login:pass'
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   167    0     0  100   167      0    166  0:00:01  0:00:01 --:--:--   167
root@server-app:/var/www/discourse#

What could be the reason?
Yandex and Discourse are incompatible?