mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-30 17:03:02 -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() |     public function boot() | ||||||
|     { |     { | ||||||
|          |         $this->app->afterResolving('mail.manager', function (GmailTransportManager $mailManager) { | ||||||
|  |             $mailManager->getSwiftMailer()->registerPlugin($this->app->make(CssInlinerPlugin::class)); | ||||||
|  |             return $mailManager; | ||||||
|  |         }); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     protected function registerIlluminateMailer() |     protected function registerIlluminateMailer() | ||||||
|     { |     { | ||||||
| 
 | 
 | ||||||
|         $this->app->singleton('mail.manager', function($app) { |         $this->app->singleton('mail.manager', function($app) { | ||||||
|             $manager = new GmailTransportManager($app); |             return new GmailTransportManager($app); | ||||||
|             // $manager->getSwiftMailer()->registerPlugin($this->app->make(CssInlinerPlugin::class));
 |  | ||||||
|             return $manager; |  | ||||||
|         }); |         }); | ||||||
| 
 | 
 | ||||||
|         $this->app->bind('mailer', function ($app) { |         $this->app->bind('mailer', function ($app) { | ||||||
| @ -53,29 +54,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;
 |  | ||||||
|         // });
 |  | ||||||
| 
 |  | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     protected function guzzle(array $config): HttpClient |     protected function guzzle(array $config): HttpClient | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user