Only clear if request was successful
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 8239862..196a4b3 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1259,7 +1259,7 @@
{
$result = $this->batch_bcc_send();
- if ($auto_clear)
+ if ($result && $auto_clear)
{
$this->clear();
}
@@ -1270,11 +1270,11 @@
$this->_build_message();
$result = $this->_spool_email();
- if ($auto_clear)
+ if ($result && $auto_clear)
{
$this->clear();
}
-
+
return $result;
}