You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 22, 2019. It is now read-only.
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:
@csimpi this project does work.
The response Trying to get property of non-object" on line 37 of .../vendor/bogardo/mailgun/src/Http/Response.php is caused by invalid config settings from config/mailgun.php file which by default seems not to utilize the .env settings.
Quick fix:
/*
* Domain name registered with Mailgun
*
*/
'domain' => env('MAILGUN_DOMAIN'),
/*
* Mailgun (private) API key
*
*/
'api_key' => env('MAILGUN_PRIVATE'),
/*
* Mailgun public API key
*
*/
'public_api_key' => env('MAILGUN_PUBLIC'),
and everything works fine!
Edit:
That's strange... the config in the repository does contain reading from .env however the one that published using publish command doesn't!
Great news! Thank you for the clarification.
I added the details to the env file only as the documentation says. I supposed those vars are coming directly from the env file, not through the mailgun config file.
I think you should change the documentation about the default/published config file difference, there are a couple of similar tickets regarding this issue, without any answer.
Finally, I'm going to use the raw mailgun-php package in Laravel since that's easier to use with the mailgun official documentation, but I wanna say thank you for your work and the solution also.
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 hasmessage
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:
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
The text was updated successfully, but these errors were encountered: