summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-17 09:52:49 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-17 09:52:49 +0200
commit8a7078b65dc387c8d74f963b80a7559bd094458a (patch)
tree5ee8dd8ec54379ff58778a6100457645c534bf53 /system/libraries
parent4525022caf352bf0dee82e8166db5025064f552d (diff)
Fix issue #1897
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Email.php16
1 files changed, 6 insertions, 10 deletions
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);