mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 14:14:36 -04:00
Merge pull request #6065 from turbo124/v5-develop
Fixes for MailServiceProvider
This commit is contained in:
commit
aafb79179a
@ -28,16 +28,17 @@ class MailServiceProvider extends MailProvider
|
||||
|
||||
public function boot()
|
||||
{
|
||||
|
||||
$this->app->afterResolving('mail.manager', function (GmailTransportManager $mailManager) {
|
||||
$mailManager->getSwiftMailer()->registerPlugin($this->app->make(CssInlinerPlugin::class));
|
||||
return $mailManager;
|
||||
});
|
||||
}
|
||||
|
||||
protected function registerIlluminateMailer()
|
||||
{
|
||||
|
||||
$this->app->singleton('mail.manager', function($app) {
|
||||
$manager = new GmailTransportManager($app);
|
||||
// $manager->getSwiftMailer()->registerPlugin($this->app->make(CssInlinerPlugin::class));
|
||||
return $manager;
|
||||
return new GmailTransportManager($app);
|
||||
});
|
||||
|
||||
$this->app->bind('mailer', function ($app) {
|
||||
@ -52,29 +53,6 @@ class MailServiceProvider extends MailProvider
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
$this->app->extend('mail.manager', function(GmailTransportManager $manager) {
|
||||
|
||||
$manager->extend('cocopostmark', function() {
|
||||
|
||||
return new PostmarkTransport(
|
||||
$this->guzzle(config('postmark.guzzle', [])),
|
||||
config('postmark.secret')
|
||||
);
|
||||
|
||||
// $manager->getSwiftMailer()->registerPlugin($this->app->make(CssInlinerPlugin::class));
|
||||
});
|
||||
|
||||
return $manager;
|
||||
|
||||
});
|
||||
|
||||
app('mail.manager')->getSwiftMailer()->registerPlugin($this->app->make(CssInlinerPlugin::class));
|
||||
|
||||
// $this->app->afterResolving('mail.manager', function (GmailTransportManager $mailManager) {
|
||||
// $mailManager->getSwiftMailer()->registerPlugin($this->app->make(CssInlinerPlugin::class));
|
||||
// return $mailManager;
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user