Archived
1
0
Fork 0

app/library/Services.php: adding Mail service.

This commit is contained in:
Henrik Hautakoski 2018-09-22 13:56:41 +02:00
parent 6847312778
commit 5c7145fd9c
No known key found for this signature in database
GPG key ID: 839F3A7EAFAEAFAA

View file

@ -27,6 +27,7 @@ use Httpcb\Auth,
Httpcb\Acl,
Httpcb\Navigation,
Httpcb\Menu,
Httpcb\Mail as MailService,
Httpcb\ViewHelper\Volt\Extension as ViewHelperVoltExtension;
use App\Listener\AclListener,
@ -386,6 +387,20 @@ class Services extends DiDefault
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)
{
$config = $this->get('config');