summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/libraries/Email.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 9d80f0720..8239862a9 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1238,7 +1238,7 @@ class CI_Email {
*
* @return bool
*/
- public function send()
+ public function send($auto_clear = TRUE)
{
if ($this->_replyto_flag === FALSE)
{
@@ -1258,13 +1258,23 @@ class CI_Email {
if ($this->bcc_batch_mode && count($this->_bcc_array) > $this->bcc_batch_size)
{
$result = $this->batch_bcc_send();
- $this->clear();
+
+ if ($auto_clear)
+ {
+ $this->clear();
+ }
+
return $result;
}
$this->_build_message();
$result = $this->_spool_email();
- $this->clear();
+
+ if ($auto_clear)
+ {
+ $this->clear();
+ }
+
return $result;
}