From 8a7078b65dc387c8d74f963b80a7559bd094458a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 17 Oct 2012 10:52:49 +0300 Subject: Fix issue #1897 --- system/libraries/Email.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'system') diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 08057f2f7..5b17edf9b 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -292,16 +292,7 @@ class CI_Email { $this->set_header('To', implode(', ', $to)); } - switch ($this->_get_protocol()) - { - case 'smtp': - $this->_recipients = $to; - break; - case 'sendmail': - case 'mail': - $this->_recipients = implode(', ', $to); - break; - } + $this->_recipients = $to; return $this; } @@ -1408,6 +1399,11 @@ class CI_Email { */ protected function _send_with_mail() { + if (is_array($this->_recipients)) + { + $this->_recipients = implode(', ', $this->_recipients); + } + if ($this->_safe_mode === TRUE) { return mail($this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str); -- cgit v1.2.3-24-g4f1b