summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-06-22 12:40:21 +0200
committerAndrey Andreev <narf@devilix.net>2017-06-22 12:40:21 +0200
commit8acd0fa915f61d4e152ce7505646865815b4f458 (patch)
tree7064d24b7273d348730d00c9ea59b144f3daa707
parent56c233fc4a455d33d2e679b59132b8a7a1cf1832 (diff)
[ci skip] Close #3711
-rw-r--r--system/libraries/Email.php22
-rw-r--r--user_guide_src/source/changelog.rst1
-rw-r--r--user_guide_src/source/libraries/email.rst12
3 files changed, 15 insertions, 20 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index fa5820dcd..73bf7ffdd 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1235,7 +1235,7 @@ class CI_Email {
/**
* Build Final Body and attachments
*
- * @return bool
+ * @return void
*/
protected function _build_message()
{
@@ -1402,8 +1402,6 @@ class CI_Email {
$this->_finalbody = ($this->_get_protocol() === 'mail')
? $body
: $hdr.$this->newline.$this->newline.$body;
-
- return TRUE;
}
// --------------------------------------------------------------------
@@ -1677,21 +1675,17 @@ class CI_Email {
if ($this->bcc_batch_mode && count($this->_bcc_array) > $this->bcc_batch_size)
{
- $result = $this->batch_bcc_send();
+ $this->batch_bcc_send();
- if ($result && $auto_clear)
+ if ($auto_clear)
{
$this->clear();
}
- return $result;
- }
-
- if ($this->_build_message() === FALSE)
- {
- return FALSE;
+ return TRUE;
}
+ $this->_build_message();
$result = $this->_spool_email();
if ($result && $auto_clear)
@@ -1750,11 +1744,7 @@ class CI_Email {
$this->_bcc_array = $bcc;
}
- if ($this->_build_message() === FALSE)
- {
- return FALSE;
- }
-
+ $this->_build_message();
$this->_spool_email();
}
}
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index c94ee8756..c1f53dac0 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -60,6 +60,7 @@ Release Date: Not Released
- :doc:`Email Library <libraries/email>` changes include:
- Changed the default value of the **validate** option to ``TRUE``.
+ - Changed the ``send()`` method to always return ``TRUE`` when sending multiple batches of emails.
- :doc:`Database <database/index>` changes include:
diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst
index bd416ba3b..81ca00e50 100644
--- a/user_guide_src/source/libraries/email.rst
+++ b/user_guide_src/source/libraries/email.rst
@@ -312,14 +312,18 @@ Class Reference
This method will automatically clear all parameters if the request was
successful. To stop this behaviour pass FALSE::
- if ($this->email->send(FALSE))
- {
- // Parameters won't be cleared
- }
+ if ($this->email->send(FALSE))
+ {
+ // Parameters won't be cleared
+ }
.. note:: In order to use the ``print_debugger()`` method, you need
to avoid clearing the email parameters.
+ .. note:: If ``batch_bcc_mode`` is enabled, and there are more than
+ ``batch_bcc_size`` recipients, this method will always return
+ boolean ``TRUE``.
+
.. php:method:: attach($filename[, $disposition = ''[, $newname = NULL[, $mime = '']]])
:param string $filename: File name