summaryrefslogtreecommitdiff
path: root/app/Core/Mail
diff options
context:
space:
mode:
authorGerardo Zamudio <gerardozamudio@users.noreply.github.com>2016-02-24 23:48:50 -0600
committerGerardo Zamudio <gerardozamudio@users.noreply.github.com>2016-02-24 23:48:50 -0600
commite4de6b3898b64b26d29aff31f21df5fda8055686 (patch)
tree575f8a65440f291d70a070d168eafca8c82a6459 /app/Core/Mail
parentd9ffbea174ea6524d0a22f8375ca8b3aa04a3c96 (diff)
parenta6540bc604c837d92c9368540c145606723e97f7 (diff)
Merge pull request #1 from fguillot/master
Update from upstream
Diffstat (limited to 'app/Core/Mail')
-rw-r--r--app/Core/Mail/Client.php20
-rw-r--r--app/Core/Mail/Transport/Mail.php2
-rw-r--r--app/Core/Mail/Transport/Sendmail.php2
-rw-r--r--app/Core/Mail/Transport/Smtp.php2
4 files changed, 14 insertions, 12 deletions
diff --git a/app/Core/Mail/Client.php b/app/Core/Mail/Client.php
index 52caef73..e1f31696 100644
--- a/app/Core/Mail/Client.php
+++ b/app/Core/Mail/Client.php
@@ -45,19 +45,21 @@ class Client extends Base
*/
public function send($email, $name, $subject, $html)
{
- $this->container['logger']->debug('Sending email to '.$email.' ('.MAIL_TRANSPORT.')');
+ if (! empty($email)) {
+ $this->logger->debug('Sending email to '.$email.' ('.MAIL_TRANSPORT.')');
- $start_time = microtime(true);
- $author = 'Kanboard';
+ $start_time = microtime(true);
+ $author = 'Kanboard';
- if ($this->userSession->isLogged()) {
- $author = e('%s via Kanboard', $this->user->getFullname($this->session['user']));
- }
+ if ($this->userSession->isLogged()) {
+ $author = e('%s via Kanboard', $this->helper->user->getFullname());
+ }
- $this->getTransport(MAIL_TRANSPORT)->sendEmail($email, $name, $subject, $html, $author);
+ $this->getTransport(MAIL_TRANSPORT)->sendEmail($email, $name, $subject, $html, $author);
- if (DEBUG) {
- $this->logger->debug('Email sent in '.round(microtime(true) - $start_time, 6).' seconds');
+ if (DEBUG) {
+ $this->logger->debug('Email sent in '.round(microtime(true) - $start_time, 6).' seconds');
+ }
}
return $this;
diff --git a/app/Core/Mail/Transport/Mail.php b/app/Core/Mail/Transport/Mail.php
index 4d833f8f..aff3ee20 100644
--- a/app/Core/Mail/Transport/Mail.php
+++ b/app/Core/Mail/Transport/Mail.php
@@ -46,7 +46,7 @@ class Mail extends Base implements ClientInterface
* Get SwiftMailer transport
*
* @access protected
- * @return \Swift_Transport
+ * @return \Swift_Transport|\Swift_MailTransport|\Swift_SmtpTransport|\Swift_SendmailTransport
*/
protected function getTransport()
{
diff --git a/app/Core/Mail/Transport/Sendmail.php b/app/Core/Mail/Transport/Sendmail.php
index 849e3385..039be705 100644
--- a/app/Core/Mail/Transport/Sendmail.php
+++ b/app/Core/Mail/Transport/Sendmail.php
@@ -16,7 +16,7 @@ class Sendmail extends Mail
* Get SwiftMailer transport
*
* @access protected
- * @return \Swift_Transport
+ * @return \Swift_Transport|\Swift_MailTransport|\Swift_SmtpTransport|\Swift_SendmailTransport
*/
protected function getTransport()
{
diff --git a/app/Core/Mail/Transport/Smtp.php b/app/Core/Mail/Transport/Smtp.php
index 757408ea..66f0a3aa 100644
--- a/app/Core/Mail/Transport/Smtp.php
+++ b/app/Core/Mail/Transport/Smtp.php
@@ -16,7 +16,7 @@ class Smtp extends Mail
* Get SwiftMailer transport
*
* @access protected
- * @return \Swift_Transport
+ * @return \Swift_Transport|\Swift_MailTransport|\Swift_SmtpTransport|\Swift_SendmailTransport
*/
protected function getTransport()
{