From 79c598b13d9e779e0dd2f17c8d22f2e0a9570ace Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 17 Jun 2021 17:59:02 +1000 Subject: [PATCH] Fixes for conflicts --- app/Providers/MailCssInlinerServiceProvider.php | 8 ++++---- app/Providers/MailServiceProvider.php | 9 +++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/Providers/MailCssInlinerServiceProvider.php b/app/Providers/MailCssInlinerServiceProvider.php index ae0fa532bf..ca9f3fb71c 100644 --- a/app/Providers/MailCssInlinerServiceProvider.php +++ b/app/Providers/MailCssInlinerServiceProvider.php @@ -42,9 +42,9 @@ class MailCssInlinerServiceProvider extends ServiceProvider return new CssInlinerPlugin([]); }); - $this->app->afterResolving('mail.manager', function (MailManager $mailManager) { - $mailManager->getSwiftMailer()->registerPlugin($this->app->make(CssInlinerPlugin::class)); - return $mailManager; - }); + // $this->app->afterResolving('mail.manager', function (MailManager $mailManager) { + // $mailManager->getSwiftMailer()->registerPlugin($this->app->make(CssInlinerPlugin::class)); + // return $mailManager; + // }); } } diff --git a/app/Providers/MailServiceProvider.php b/app/Providers/MailServiceProvider.php index ee41c57ccf..e72097c4ce 100644 --- a/app/Providers/MailServiceProvider.php +++ b/app/Providers/MailServiceProvider.php @@ -33,7 +33,7 @@ class MailServiceProvider extends MailProvider protected function registerIlluminateMailer() { - + $this->app->singleton('mail.manager', function($app) { return new GmailTransportManager($app); }); @@ -50,7 +50,12 @@ class MailServiceProvider extends MailProvider ); }); - + + $this->app->afterResolving('mail.manager', function (MailManager $mailManager) { + $mailManager->getSwiftMailer()->registerPlugin($this->app->make(CssInlinerPlugin::class)); + return $mailManager; + }); + } protected function guzzle(array $config): HttpClient