K
K
Karpkarp2020-03-09 11:11:00
Laravel
Karpkarp, 2020-03-09 11:11:00

Why is Laravel's contact form not working?

Throws this error

Connection could not be established with host smtp.gmail.com :stream_socket_client(): unable to connect to tcp://smtp.gmail.com:587 (Network is unreachable)


Everything seems to be filled in as it should.
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=pass
MAIL_ENCRYPTION=tls


In the config, I also entered the necessary data
array (
    'driver' => 'smtp',
    'host' => 'smtp.gmail.com',
    'port' => '587',
    'from' => 
    array (
      'address' => '[email protected]',
      'name' => 'Example',
    ),
    'encryption' => 'tls',
    'username' => '[email protected]',
    'password' => 'pass',
    'sendmail' => '/usr/sbin/sendmail -bs',
    'markdown' => 
    array (
      'theme' => 'default',
      'paths' => 
      array (
        0 => '/home/i1774388/public_html/resources/views/vendor/mail',
      ),
    ),
    'log_channel' => NULL,
  ),

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2020-03-09
@vitaly_il1

unable to connect to tcp://smtp.gmail.com:587 (Network is unreachable)

try to manually (telnet) connect from this server

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question