Laravel, Mailgun 'GuzzleHttp class \ Client name not found'

When trying to use Mailgun to send a confirmation email from my Laravel project, I get the following error shown below.

Here is my .env file:

MAIL_DRIVER=mailgun
MAILGUN_DOMAIN=sandbox......mailgun.org
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
MAIL_USERNAME=postmaster@sandbox......mailgun.org
MAIL_PASSWORD=password
MAILGUN_SECRET=key-....
MAIL_FROM=cloud@sandbox.....mailgun.org
MAIL_ENCRYPTION=tls

      

Here is my mail.php file:

'driver' => env('MAIL_DRIVER', 'mailgun'),
'host' => env('MAIL_HOST', 'smtp.mailgun.com'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),

      

And this is in my composer.json:

"guzzlehttp/guzzle": "^6.2"

      

Any help of any kind would be much appreciated. I just don't understand the problem.

+3


source to share


1 answer


These possible quick fixes have a try in the order I explained,

1) do a composer update

and composer dump-autoload

once

2) clear the config cache by running php artisan config:clear



If all else fails, try changing the package to "guzzlehttp/guzzle": "~5.3|~6.0"

and run the commands above to install the package and clear the configuration cache.

It should work when you run the second step.

+1


source







All Articles