diff options
author | buhay <drag0n2815@gmail.com> | 2013-04-17 23:25:34 +0200 |
---|---|---|
committer | buhay <drag0n2815@gmail.com> | 2013-04-17 23:25:34 +0200 |
commit | 466e8083e7daed0926325b5646004f314489ef7f (patch) | |
tree | 63264dc6e1672372e20528d035085b9c96943c01 /system | |
parent | 31da423ebba877984675e7232f100842d58b6dfc (diff) |
Correction for issue #2388. Updated _build_message() to return a boolean. This prevents email from sending if there is an error trying to attach an attachment to the email.
Diffstat (limited to 'system')
-rw-r--r-- | system/libraries/Email.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php index a745d331d..886d7bd91 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1236,7 +1236,7 @@ class CI_Email { /** * Build Final Body and attachments * - * @return void + * @return boolean */ protected function _build_message() { @@ -1401,7 +1401,7 @@ class CI_Email { $body .= implode($this->newline, $attachment).$this->newline.'--'.$this->_atc_boundary.'--'; $this->_finalbody = ($this->_get_protocol() === 'mail') ? $body : $hdr.$body; - return; + return TRUE; } // -------------------------------------------------------------------- @@ -1606,7 +1606,10 @@ class CI_Email { return $result; } - $this->_build_message(); + if ($this->_build_message() === FALSE) + { + return FALSE; + } $result = $this->_spool_email(); if ($result && $auto_clear) @@ -1665,7 +1668,10 @@ class CI_Email { $this->_bcc_array = $bcc; } - $this->_build_message(); + if ($this->_build_message() === FALSE) + { + return FALSE; + } $this->_spool_email(); } } |