From bd0ed331797717ff9db63216df550d95674ba248 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 18 Feb 2017 19:13:08 -0500 Subject: Add Reply-To header to emails sent from Kanboard --- app/Job/EmailJob.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'app/Job/EmailJob.php') 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'); } } -- cgit v1.2.3