mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
218674dba1
@ -2,12 +2,14 @@
|
||||
|
||||
namespace App\Helpers\Mail;
|
||||
|
||||
use Illuminate\Mail\MailManager;
|
||||
use App\CustomMailDriver\CustomTransport;
|
||||
use Dacastro4\LaravelGmail\Services\Message\Mail;
|
||||
use Illuminate\Mail\TransportManager;
|
||||
|
||||
class GmailTransportManager extends TransportManager
|
||||
|
||||
class GmailTransportManager extends MailManager
|
||||
{
|
||||
protected function createGmailDriver()
|
||||
protected function createGmailTransport()
|
||||
{
|
||||
info('ping pong');
|
||||
$token = $this->app['config']->get('services.gmail.token', []);
|
||||
|
@ -4,22 +4,27 @@ 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->registerSwiftTransport();
|
||||
$this->registerIlluminateMailer();
|
||||
$this->registerMarkdownRenderer();
|
||||
}
|
||||
|
||||
protected function registerSwiftTransport()
|
||||
protected function registerIlluminateMailer()
|
||||
{
|
||||
|
||||
$this->app->singleton('swift.transport', function ($app) {
|
||||
$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();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user