K
K
KiselevPD2019-03-18 10:56:36
Laravel
KiselevPD, 2019-03-18 10:56:36

Why in Laravel, when changing settings in env and mail.php, nothing changes on the site?

Hello! I use Laravel to send emails via the smtp driver and Yandex.mail
.env:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.yandex.ru
MAIL_PORT=587
MAIL_USERNAME=***@***.ru
MAIL_PASSWORD=****
MAIL_ENCRYPTION=ssl
mail. php

'driver' => env('MAIL_DRIVER', 'smtp'),
    'host' => env('MAIL_HOST', 'smtp.yandex.ru'),
    'port' => env('MAIL_PORT', 587),
    'from' => ['address' => '***@***.ru', 'name' => 'Test'],
    'encryption' => env('MAIL_ENCRYPTION', 'ssl'),
    'username' => env('MAIL_USERNAME'),
    'password' => env('MAIL_PASSWORD'),

When I try to send mail, I get an error
(1/1) Swift_TransportException
Connection to tcp://smtp.yandex.ru:465 Timed Out
Naturally, I go to Google, I see advice to try changing the port and encryption. I change the port, clear the cache in Laravel, restart the web server, try again and get the error
Connection to tcp://smtp.yandex.ru:465 Timed Out
Why does the port not change in the error? I put 587

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2019-03-18
@KiselevPD

Because the configs are cached , most likely.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question