It seems this project has been abandoned and doesn't really works with the new version of mailgun api.
I'm not sure about this, but I couldn't make it work, I'm getting Mailgun Magnificent API response after any API request that this wrapper sends through Mailgun API.
I modified the package on my local and added some debugging, the configuration seems to be okay.
When I opened the https://github.com/Bogardo/Mailgun/blob/master/src/Mail/Mailer.php file I realized, this wrapper uses deprecated methods, so I suppose this causes the
Trying to get property of non-object" on line 37 of .../vendor/bogardo/mailgun/src/Http/Response.php error, since the wrong request generates a reponse that not has message property.
Everybody who would like to use the mailgun-php (https://github.com/mailgun/mailgun-php) client with Laravel project can implement and use the original package with adding this line to the /config/app.php file to the aliases array:
'Mailgun' => Mailgun\Mailgun::class,
then you will be able to use original mailgun-php client's functions, like:
$mg = Mailgun::create(env('MAILGUN_PRIVATE'));
$dns = $mg->domains()->show(env('MAILGUN_DOMAIN'))->getInboundDNSRecords();
dump($dns);
I removed bogardo/mailgun wrapper
composer remove bogardo/mailgun
Installed mailgun and guzzle adapter
composer require mailgun/mailgun-php
composer require php-http/guzzle6-adapter
It seems this project has been abandoned and doesn't really works with the new version of mailgun api.
I'm not sure about this, but I couldn't make it work, I'm getting
Mailgun Magnificent APIresponse after any API request that this wrapper sends through Mailgun API.I modified the package on my local and added some debugging, the configuration seems to be okay.
When I opened the https://github.com/Bogardo/Mailgun/blob/master/src/Mail/Mailer.php file I realized, this wrapper uses deprecated methods, so I suppose this causes the
Trying to get property of non-object" on line 37 of .../vendor/bogardo/mailgun/src/Http/Response.phperror, since the wrong request generates a reponse that not hasmessageproperty.Everybody who would like to use the mailgun-php (https://github.com/mailgun/mailgun-php) client with Laravel project can implement and use the original package with adding this line to the
/config/app.phpfile to the aliases array:'Mailgun' => Mailgun\Mailgun::class,then you will be able to use original mailgun-php client's functions, like:
I removed bogardo/mailgun wrapper
composer remove bogardo/mailgunInstalled mailgun and guzzle adapter
composer require mailgun/mailgun-phpcomposer require php-http/guzzle6-adapter