Answer the question
In order to leave comments, you need to log in
Swiftmailer yii2 or fsockopen on smtp.yandex.ru?
For the second day I can not set up the usual sending to the mail! In config:
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'ssl://smtp.yandex.com',
'username' => $params['supportMail'],
'password' => 'pass',
'port' => '465',
'encryption' => 'ssl',
],
Exception 'Swift_TransportException' with message 'Connection could not be established with host ssl://smtp.yandex.com [php_network_getaddresses: getaddrinfo failed: Name or service not known #0]'
Exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.yandex.com [Connection timed out #110]'
fsockopen('ssl://smtp.yandex.com', 465, $errno, $errstr, 10); // по тайм ауту ошибка
fsockopen('ssl://smtp.gmail.com', 465, $errno, $errstr, 10); // тоже самое, просто решил попробовать
fsockopen('mysitedomain.ru', 443, $errno, $errstr, 10); // на мой сайт нормально коннектится c ssl:// и без
iptables -P OUTPUT ACCEPT
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question