From d7bc8d04e5c13bbafe3bf10ca2634c1f8481ed53 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Mon, 30 Jul 2012 09:46:20 +0100 Subject: New parameter to automatically clear the parameters --- system/libraries/Email.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'system/libraries/Email.php') 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; } -- cgit v1.2.3-24-g4f1b