Merge pull request #5521 from turbo124/v5-develop

Fixes for post mark mailer
This commit is contained in:
David Bomba 2021-04-25 01:12:13 +10:00 committed by GitHub
commit f1eafb699e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,18 +36,21 @@ class MailServiceProvider extends MailProvider
}); });
$this->app['mail.manager']->extend('postmark', function () { $this->app['mail.manager']->extend('postmark', function () {
return new HttpClient(array_merge($config, [ return new PostmarkTransport(
'base_uri' => empty($config['base_uri']) $this->guzzle(config('postmark.guzzle', [])),
? 'https://api.postmarkapp.com' config('postmark.secret')
: $config['base_uri'] );
]));
}); });
} }
protected function guzzle(array $config): HttpClient protected function guzzle(array $config): HttpClient
{ {
return new HttpClient($config); return new HttpClient(array_merge($config, [
'base_uri' => empty($config['base_uri'])
? 'https://api.postmarkapp.com'
: $config['base_uri']
]));
} }
public function provides() public function provides()