From 19ff69110db6b991c0c9e7b645b339e1f57132f8 Mon Sep 17 00:00:00 2001 From: bison-paolo Date: Fri, 14 Oct 2016 18:02:58 +0200 Subject: [PATCH] Bug fix: debug email is also used for CC and BCC --- application/libraries/MailLib.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application/libraries/MailLib.php b/application/libraries/MailLib.php index 3458c71c6..53ecffad2 100644 --- a/application/libraries/MailLib.php +++ b/application/libraries/MailLib.php @@ -57,15 +57,19 @@ class MailLib // Check if the email address of the debug recipient is a valid one $recipient = $to; + $recipientCC = $cc; + $recipientBCC = $bcc; if ($this->validateEmailAddress(MAIL_DEBUG)) { // if is it valid use it!!! $recipient = MAIL_DEBUG; + $recipientCC = MAIL_DEBUG; + $recipientBCC = MAIL_DEBUG; } $this->ci->email->to($recipient); - if (!is_null($cc)) $this->ci->email->cc($cc); - if (!is_null($bcc)) $this->ci->email->bcc($bcc); + if (!is_null($recipientCC)) $this->ci->email->cc($recipientCC); + if (!is_null($recipientBCC)) $this->ci->email->bcc($recipientBCC); $this->ci->email->subject($subject); $this->ci->email->message($message); if (!empty($altMessage)) $this->ci->email->set_alt_message($altMessage);