1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Providers/MailServiceProvider.php

31 lines
628 B
PHP
Raw Normal View History

<?php
namespace App\Providers;
use App\Helpers\Mail\GmailTransportManager;
use Illuminate\Mail\MailServiceProvider as MailProvider;
2021-02-10 12:34:39 +01:00
use Illuminate\Mail\TransportManager;
class MailServiceProvider extends MailProvider
{
2021-02-10 12:06:10 +01:00
public function register()
{
2021-02-10 12:17:27 +01:00
$this->registerIlluminateMailer();
2021-02-10 12:06:10 +01:00
}
2021-02-10 12:34:39 +01:00
protected function registerIlluminateMailer()
{
2021-02-10 12:34:39 +01:00
$this->app->singleton('mail.manager', function($app) {
return new GmailTransportManager($app);
});
2021-02-10 12:06:10 +01:00
2021-02-11 00:38:42 +01:00
2021-02-10 12:34:39 +01:00
$this->app->bind('mailer', function ($app) {
return $app->make('mail.manager')->mailer();
});
}
2021-02-10 12:34:39 +01:00
}
2021-02-10 12:34:39 +01:00