mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 22:27:31 -05:00 
			
		
		
		
	Fixes for newer postmark driver
This commit is contained in:
		
							parent
							
								
									7abb352965
								
							
						
					
					
						commit
						55a0d596e0
					
				@ -3,8 +3,10 @@
 | 
			
		||||
namespace App\Providers;
 | 
			
		||||
 | 
			
		||||
use App\Helpers\Mail\GmailTransportManager;
 | 
			
		||||
use Coconuts\Mail\PostmarkTransport;
 | 
			
		||||
use Illuminate\Mail\MailServiceProvider as MailProvider;
 | 
			
		||||
use Illuminate\Mail\TransportManager;
 | 
			
		||||
use GuzzleHttp\Client as HttpClient;
 | 
			
		||||
 | 
			
		||||
class MailServiceProvider extends MailProvider
 | 
			
		||||
{
 | 
			
		||||
@ -24,7 +26,18 @@ class MailServiceProvider extends MailProvider
 | 
			
		||||
        $this->app->bind('mailer', function ($app) {
 | 
			
		||||
            return $app->make('mail.manager')->mailer();
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        $this->app['mail.manager']->extend('postmark', function () {
 | 
			
		||||
            return new PostmarkTransport(
 | 
			
		||||
                $this->guzzle(config('postmark.guzzle', [])),
 | 
			
		||||
                config('postmark.secret', config('services.postmark.secret'))
 | 
			
		||||
            );
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    protected function guzzle(array $config): HttpClient
 | 
			
		||||
    {
 | 
			
		||||
        return new HttpClient($config);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										30
									
								
								config/postmark.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								config/postmark.php
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,30 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
return [
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    |--------------------------------------------------------------------------
 | 
			
		||||
    | Postmark credentials
 | 
			
		||||
    |--------------------------------------------------------------------------
 | 
			
		||||
    |
 | 
			
		||||
    | Here you may provide your Postmark server API token.
 | 
			
		||||
    |
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
    'secret' => env('POSTMARK_SECRET'),
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    |--------------------------------------------------------------------------
 | 
			
		||||
    | Guzzle options
 | 
			
		||||
    |--------------------------------------------------------------------------
 | 
			
		||||
    |
 | 
			
		||||
    | Under the hood we use Guzzle to make API calls to Postmark.
 | 
			
		||||
    | Here you may provide any request options for Guzzle.
 | 
			
		||||
    |
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
    'guzzle' => [
 | 
			
		||||
        'timeout' => 10,
 | 
			
		||||
        'connect_timeout' => 10,
 | 
			
		||||
    ],
 | 
			
		||||
];
 | 
			
		||||
@ -36,9 +36,6 @@ return [
 | 
			
		||||
    'gmail' => [
 | 
			
		||||
        'token' => '',
 | 
			
		||||
    ],
 | 
			
		||||
    'postmark' => [
 | 
			
		||||
        'token' => env('POSTMARK_API_TOKEN', ''),
 | 
			
		||||
    ],
 | 
			
		||||
    'stripe' => [
 | 
			
		||||
        'model'  => App\Models\User::class,
 | 
			
		||||
        'key'    => env('STRIPE_KEY'),
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user