Closed iulianba closed 6 years ago
I'm having the same issue. Upgraded to v5, got class mailgun.client does not exist
, installed Guzzle6 adapter, bound to container (with no config) and now I'm seeing this error message. I assume I need to add a base url or something, but it would be useful if there was an upgrade guide when new versions have breaking changes.
I fixed the issue by generating the config file. In older versions this was not a requirement, from what I knew:
php artisan vendor:publish --provider="Bogardo\Mailgun\MailgunServiceProvider" --tag="config"
Configure api settings and you should be good to go.
Thanks! One question – setting has a public_api_key
. Not sure what that is, Mailgun only gives private key, domain, smtp user/pass.
I added the private key to both public_api_key and api_key. Not sure if it`s the smart/right way of doing it.
You can find your public API key in your account under 'Security'. https://app.mailgun.com/app/account/security
The key should start with pubkey-
I have the same key under the link you provided and domain settings. And starts with: key-xxxx
Is it safe to add it for public_api_key and api_key?
Thanks
in laravel v 5.7 need install
composer require php-http/guzzle6-adapter ^1.0
add in providers
$this->app->bind('mailgun.client', function() {
return \Http\Adapter\Guzzle6\Client::createWithConfig([
]);
});
And finally
php artisan vendor:publish --provider="Bogardo\Mailgun\MailgunServiceProvider" --tag="config"
Gracias Totales
Hello,
I think I did something wrong when I tried to implement Guzzle 6 example. Before this step, I was always getting class mailgun.client does not exist
So I added in register of AppServiceProvider:
Do i need to actually write a config in there? I have no idea what should I do.
Thanks