app/library/Services.php: adding Mail service.
This commit is contained in:
parent
6847312778
commit
5c7145fd9c
1 changed files with 15 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ use Httpcb\Auth,
|
||||||
Httpcb\Acl,
|
Httpcb\Acl,
|
||||||
Httpcb\Navigation,
|
Httpcb\Navigation,
|
||||||
Httpcb\Menu,
|
Httpcb\Menu,
|
||||||
|
Httpcb\Mail as MailService,
|
||||||
Httpcb\ViewHelper\Volt\Extension as ViewHelperVoltExtension;
|
Httpcb\ViewHelper\Volt\Extension as ViewHelperVoltExtension;
|
||||||
|
|
||||||
use App\Listener\AclListener,
|
use App\Listener\AclListener,
|
||||||
|
|
@ -386,6 +387,20 @@ class Services extends DiDefault
|
||||||
return new \SendGrid($this->get('config')->sendgrid->key);
|
return new \SendGrid($this->get('config')->sendgrid->key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register the mail service.
|
||||||
|
*
|
||||||
|
* @return MailService
|
||||||
|
*/
|
||||||
|
protected function _initSharedMail()
|
||||||
|
{
|
||||||
|
$config = $this->get('config');
|
||||||
|
|
||||||
|
$sendgrid = new \SendGrid($config->sendgrid->key);
|
||||||
|
|
||||||
|
return new MailService($sendgrid);
|
||||||
|
}
|
||||||
|
|
||||||
protected function _initOauth($provider)
|
protected function _initOauth($provider)
|
||||||
{
|
{
|
||||||
$config = $this->get('config');
|
$config = $this->get('config');
|
||||||
|
|
|
||||||
Reference in a new issue