Yii2 Swiftmailer cannot send mail from a different server other than gmail, I can not understand why?

When sending mail with gmail all works fine, as soon as apply server settings which I gave admin to email all the flies and gives an error, help to understand.
Configure mailer
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
'useFileTransport' => false,
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'mail.chumak.net',
'username' => '******',
'password' => '******',
'port' => '587',
'encryption' => 'tls',
],
],
And error that gives now.
stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
July 9th 19 at 12:47
1 answer
July 9th 19 at 12:49
Solution
Get encryption at all or change the tsl to ssl. Apparently it is in the certificate.
changed tsl to ssl and now this error
Connection could not be established with host mail.chumak.net [ #0] - liana_Cronin commented on July 9th 19 at 12:52
port? - Henderson_Beat commented on July 9th 19 at 12:55

Find more questions by tags PHPYii