Skip to content
This repository was archived by the owner on Dec 22, 2019. It is now read-only.
This repository was archived by the owner on Dec 22, 2019. It is now read-only.

Troubles with the API request, deprecated usable of mailgun-php lib #144

Description

@csimpi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions