diff --git a/app/Helpers/Mail/GmailTransportManager.php b/app/Helpers/Mail/GmailTransportManager.php index e4877c81e3..628e511d62 100644 --- a/app/Helpers/Mail/GmailTransportManager.php +++ b/app/Helpers/Mail/GmailTransportManager.php @@ -9,6 +9,7 @@ class GmailTransportManager extends TransportManager { protected function createGmailDriver() { + info('ping pong'); $token = $this->app['config']->get('services.gmail.token', []); $mail = new Mail; diff --git a/app/Providers/MailServiceProvider.php b/app/Providers/MailServiceProvider.php index 30c8253b7e..1921fded43 100644 --- a/app/Providers/MailServiceProvider.php +++ b/app/Providers/MailServiceProvider.php @@ -7,8 +7,15 @@ use Illuminate\Mail\MailServiceProvider as MailProvider; class MailServiceProvider extends MailProvider { + + public function register() + { + $this->registerSwiftTransport(); + } + protected function registerSwiftTransport() { + $this->app->singleton('swift.transport', function ($app) { return new GmailTransportManager($app); }); diff --git a/config/mail.php b/config/mail.php index 54299aabf8..20d5582eb7 100644 --- a/config/mail.php +++ b/config/mail.php @@ -70,6 +70,10 @@ return [ 'array' => [ 'transport' => 'array', ], + 'gmail' => [ + 'transport' => 'gmail', + ], + ], /*