From f99a3c501fd6ed7b4914b8d6e855489c2ce5b219 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 16 Oct 2015 20:50:12 -0400 Subject: Make mail transports pluggable and move integrations to plugins - Postmark: https://github.com/kanboard/plugin-postmark - Mailgun: https://github.com/kanboard/plugin-mailgun - Sendgrid: https://github.com/kanboard/plugin-sendgrid --- app/Core/EmailClient.php | 49 ------------------------------------------------ 1 file changed, 49 deletions(-) delete mode 100644 app/Core/EmailClient.php (limited to 'app/Core/EmailClient.php') diff --git a/app/Core/EmailClient.php b/app/Core/EmailClient.php deleted file mode 100644 index 38d6b3f1..00000000 --- a/app/Core/EmailClient.php +++ /dev/null @@ -1,49 +0,0 @@ -container['logger']->debug('Sending email to '.$email.' ('.MAIL_TRANSPORT.')'); - - $start_time = microtime(true); - $author = 'Kanboard'; - - if (Session::isOpen() && $this->userSession->isLogged()) { - $author = e('%s via Kanboard', $this->user->getFullname($this->session['user'])); - } - - switch (MAIL_TRANSPORT) { - case 'sendgrid': - $this->sendgrid->sendEmail($email, $name, $subject, $html, $author); - break; - case 'mailgun': - $this->mailgun->sendEmail($email, $name, $subject, $html, $author); - break; - case 'postmark': - $this->postmark->sendEmail($email, $name, $subject, $html, $author); - break; - default: - $this->smtp->sendEmail($email, $name, $subject, $html, $author); - } - - $this->container['logger']->debug('Email sent in '.round(microtime(true) - $start_time, 6).' seconds'); - } -} -- cgit v1.2.3