summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authordchill42 <dchill42@gmail.com>2012-07-31 15:41:01 +0200
committerdchill42 <dchill42@gmail.com>2012-07-31 15:41:01 +0200
commit7e92b7332ea4d28648e69eabcb93cead35dbca26 (patch)
treeb7714536b89557129ed51fe675725fe28639c1e0 /system/libraries
parent57486009573a86d9e286a49c92216ba17aae0d5a (diff)
parent3a2d573a96241c01124d15c1ce517078e07c6235 (diff)
Merge branch 'develop' of github.com:/EllisLab/CodeIgniter into session
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Email.php20
1 files changed, 17 insertions, 3 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index fdb9be4da..8fd7a79e7 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)
{
@@ -1257,11 +1257,25 @@ class CI_Email {
if ($this->bcc_batch_mode && count($this->_bcc_array) > $this->bcc_batch_size)
{
- return $this->batch_bcc_send();
+ $result = $this->batch_bcc_send();
+
+ if ($result && $auto_clear)
+ {
+ $this->clear();
+ }
+
+ return $result;
}
$this->_build_message();
- return $this->_spool_email();
+ $result = $this->_spool_email();
+
+ if ($result && $auto_clear)
+ {
+ $this->clear();
+ }
+
+ return $result;
}
// --------------------------------------------------------------------