2019-12-04 15:52:04 +11:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Helpers\Mail;
|
|
|
|
|
|
2021-02-10 22:34:39 +11:00
|
|
|
use Illuminate\Mail\MailManager;
|
|
|
|
|
use App\CustomMailDriver\CustomTransport;
|
2019-12-04 15:52:04 +11:00
|
|
|
use Dacastro4\LaravelGmail\Services\Message\Mail;
|
2021-02-11 22:37:58 +11:00
|
|
|
use Illuminate\Support\Facades\Config;
|
2019-12-04 15:52:04 +11:00
|
|
|
|
2021-02-10 22:34:39 +11:00
|
|
|
|
|
|
|
|
class GmailTransportManager extends MailManager
|
2019-12-04 15:52:04 +11:00
|
|
|
{
|
2021-02-10 22:34:39 +11:00
|
|
|
protected function createGmailTransport()
|
2019-12-04 15:52:04 +11:00
|
|
|
{
|
2021-02-11 10:38:42 +11:00
|
|
|
|
2021-02-11 22:37:58 +11:00
|
|
|
//$token = $this->app['config']->get('services.gmail.token', []);
|
2021-02-11 23:35:46 +11:00
|
|
|
$token = config('services.gmail.token');
|
|
|
|
|
|
2019-12-04 16:26:07 +11:00
|
|
|
$mail = new Mail;
|
2019-12-05 17:22:20 +11:00
|
|
|
|
|
|
|
|
return new GmailTransport($mail, $token);
|
2019-12-04 15:52:04 +11:00
|
|
|
}
|
2021-02-10 22:34:39 +11:00
|
|
|
}
|