mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
31 lines
686 B
PHP
31 lines
686 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Helpers\Mail\GmailTransportManager;
|
|
use Illuminate\Mail\MailServiceProvider as MailProvider;
|
|
use Illuminate\Mail\TransportManager;
|
|
|
|
class MailServiceProvider extends MailProvider
|
|
{
|
|
|
|
public function register()
|
|
{
|
|
$this->registerIlluminateMailer();
|
|
}
|
|
|
|
protected function registerIlluminateMailer()
|
|
{
|
|
$this->app->singleton('mail.manager', function($app) {
|
|
return new GmailTransportManager($app);
|
|
});
|
|
|
|
// Copied from Illuminate\Mail\MailServiceProvider
|
|
$this->app->bind('mailer', function ($app) {
|
|
return $app->make('mail.manager')->mailer();
|
|
});
|
|
}
|
|
|
|
}
|
|
|