J
J
jazzus2019-02-12 15:19:34
Laravel
jazzus, 2019-02-12 15:19:34

Why does it give an error when sending yandex-email on the server?

When sending an email, the wheel spins for a long time and then falls off with error 500. In the Laravel logs: (Swift_TransportException (code: 0): Connection could not be established with host smtp.yandex.ru in the StreamBuffer.php:269 file
Only on the server. On the localhost Mail
is sent.This is an error: Laravel, server or Yandex?
Setting up mail (Yandex mail for domain):

MAIL_DRIVER=smtp
MAIL_HOST=smtp.yandex.ru
MAIL_PORT=465
MAIL_ENCRYPTION=SSL

Ubuntu server running Laravel Forge. LetsEncrypt SSL is connected to the domain (not on localhost).
update
I change to gmail mail (which also works on localhost) - the same error only with smtp.gmail.com
php artisan config:cache did not help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Samoilov, 2019-02-12
@jazzus

Check out the solution here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question