From 5c7145fd9c7f71cd8ccdcd2809ec7328fc716f54 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sat, 22 Sep 2018 13:56:41 +0200 Subject: [PATCH] app/library/Services.php: adding Mail service. --- app/library/Services.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/library/Services.php b/app/library/Services.php index c0b0fc3..0cbf5a7 100644 --- a/app/library/Services.php +++ b/app/library/Services.php @@ -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');