Merge pull request #6065 from turbo124/v5-develop
Fixes for MailServiceProvider
This commit is contained in:
commit
aafb79179a
1 changed files with 5 additions and 27 deletions
|
|
@ -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…
Add table
Reference in a new issue