close

[Solved] could not be established with host mailtrap.io [php_network_getaddresses: getaddrinfo failed: No such host is known. #0]

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error could not be established with host mailtrap.io [php_network_getaddresses: getaddrinfo failed: No such host is known. #0] in php. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How could not be established with host mailtrap.io [php_network_getaddresses: getaddrinfo failed: No such host is known. #0] Error Occurs?

How To Solve could not be established with host mailtrap.io [php_network_getaddresses: getaddrinfo failed: No such host is known. #0] Error ?

  1. How To Solve could not be established with host mailtrap.io [php_network_getaddresses: getaddrinfo failed: No such host is known. #0] Error ?

    To Solve could not be established with host mailtrap.io [php_network_getaddresses: getaddrinfo failed: No such host is known. #0] Error After modify your settings you need to run: php artisan config:cache
    Without those laravel will use old ones.

  2. To Solve could not be established with host mailtrap.io [php_network_getaddresses: getaddrinfo failed: No such host is known. #0] Error

    To Solve could not be established with host mailtrap.io [php_network_getaddresses: getaddrinfo failed: No such host is known. #0] Error After modify your settings you need to run: php artisan config:cache
    Without those laravel will use old ones.

Solution 1

This problem occurs when some changes have been made to files, specifically in .env file

Clear cache using artisan command

php artisan cache:clear

Clear config

php artisan config:clear

Restart your server

sudo service apache2 restart

More: Try clearing browsers cache & cookies. Hope that works

Solution 2

After modify your settings you need to run: php artisan config:cache

Without those laravel will use old ones.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment