davidzucco
davidzucco

Reputation: 41

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

I am receiving the following error shown below when attempting to use Mailgun to send a confirmation email from my Laravel project.

Here is my .env file:

MAIL_DRIVER=mailgun
MAILGUN_DOMAIN=sandbox......mailgun.org
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=password
MAILGUN_SECRET=key-....
[email protected]
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 at all would be so greatly appreciated. I simply don't understand the issue.

Upvotes: 3

Views: 945

Answers (1)

Reiah Paul Sam
Reiah Paul Sam

Reputation: 555

These are the 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 nothing works try changing the package to "guzzlehttp/guzzle": "~5.3|~6.0" and run the above commands to install the package and clear the config cache.

It should work when you run the second step.

Upvotes: 1

Related Questions