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.

Using full api from mailgun-php #151

Description

@sinnbeck

Had some issues with using the full api implementation in mailgun-php, but got it working by setting up Guzzle correctly. This allows you to use the full API on this page through Mailgun::api()

https://github.com/mailgun/mailgun-php/blob/master/doc/index.md

The updated code for the service provider

$this->app->bind('mailgun.client', function() {
            $headers['Authorization'] = 'Basic '.base64_encode(sprintf('%s:%s', 'api', config('mailgun.api_key')));
            return \Http\Adapter\Guzzle6\Client::createWithConfig([
                'base_uri' => 'https://' . config('mailgun.api.endpoint'),
                'headers' => $headers
            ]);
        });

Hope this helps someone

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