настройки
Код: Выделить всё
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'useFileTransport' => false,
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.gmail.com',//localhost
'username' => 'zmogesh@gmail.com',//username
'password' => 'xxxxxx',//password
'port' => '587',//465
'encryption' => 'tls',//ssl
'streamOptions' =>[
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
],
],
],
],
Код: Выделить всё
Yii::$app->mailer->compose('cart')->setFrom(['zmogesh@gmail.com' => 'ТИ ЗМОЖЕШ ВСЕ'])->setTo('email@gmail.com')->setSubject('Ваш заказ на сайте...')->send();
Connection could not be established with host smtp.gmail.com [Connection refused #111]
почта вроде как настроена (раньше отправка писем работала норм)
ребята с хостинга сказали, что с их стороны все работает...
Помогите...не знаю что делать...