1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00
invoiceninja/app/Providers/MailServiceProvider.php
2021-02-10 22:34:39 +11:00

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();
});
}
}