Laravel Mail Open SSL error solution
If you are getting one of the errors below, you are in the right place. s…
Laravel Mail Open SSL error solution
Fri, 21, Feb, 2020 14:18

Laravel Mail Open SSL error solution

If you are getting one of the errors below, you are in the right place.

  1. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:\n error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
  1. return stream_socket_enable_crypto($this->stream, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);

Solution: Go to the app / config / mail.php file and add the lines below to the end of the file.

  1. 'stream' => [
  2. 'ssl' => [
  3. 'verify_peer' => false,
  4. 'verify_peer_name' => false,
  5. 'allow_self_signed' => true,
  6. ],
  7. ],

Let's go to the directory where our project is located and clear the Cache.

php artisan config:cache