diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-02-18 19:13:08 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-02-18 19:13:08 -0500 |
commit | bd0ed331797717ff9db63216df550d95674ba248 (patch) | |
tree | 0f3fbe140b26274ab5ac80b74aa7a29d37b0689b /app/Job | |
parent | b4dc602381a367ce9ed1a1bbe28b7903976fdabe (diff) |
Add Reply-To header to emails sent from Kanboard
Diffstat (limited to 'app/Job')
-rw-r--r-- | app/Job/EmailJob.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/app/Job/EmailJob.php b/app/Job/EmailJob.php index 2da3ca2a..c6eb500a 100644 --- a/app/Job/EmailJob.php +++ b/app/Job/EmailJob.php @@ -14,16 +14,17 @@ class EmailJob extends BaseJob * Set job parameters * * @access public - * @param string $email - * @param string $name + * @param string $recipientEmail + * @param string $recipientName * @param string $subject * @param string $html - * @param string $author + * @param string $authorName + * @param string $authorEmail * @return $this */ - public function withParams($email, $name, $subject, $html, $author) + public function withParams($recipientEmail, $recipientName, $subject, $html, $authorName, $authorEmail) { - $this->jobParams = array($email, $name, $subject, $html, $author); + $this->jobParams = array($recipientEmail, $recipientName, $subject, $html, $authorName, $authorEmail); return $this; } @@ -31,25 +32,24 @@ class EmailJob extends BaseJob * Execute job * * @access public - * @param string $email - * @param string $name + * @param string $recipientEmail + * @param string $recipientName * @param string $subject * @param string $html - * @param string $author + * @param string $authorName + * @param string $authorEmail */ - public function execute($email, $name, $subject, $html, $author) + public function execute($recipientEmail, $recipientName, $subject, $html, $authorName, $authorEmail) { $transport = $this->helper->mail->getMailTransport(); - $this->logger->debug(__METHOD__.' Sending email to: '.$email.' using transport: '.$transport); $startTime = microtime(true); + $this->logger->debug(__METHOD__.' Sending email to: '.$recipientEmail.' using transport: '.$transport); + $this->emailClient ->getTransport($transport) - ->sendEmail($email, $name, $subject, $html, $author) - ; + ->sendEmail($recipientEmail, $recipientName, $subject, $html, $authorName, $authorEmail); - if (DEBUG) { - $this->logger->debug('Email sent in '.round(microtime(true) - $startTime, 6).' seconds'); - } + $this->logger->debug(__METHOD__.' Email sent in '.round(microtime(true) - $startTime, 6).' seconds'); } } |