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