diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-02 19:10:19 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-02 19:10:19 +0100 |
commit | 75b2c7fd0e23afc5c0338a7b62854d38b37b9c62 (patch) | |
tree | 0ed48198d63b37874d11ec3dc29645fa62f85aab | |
parent | 7cb8820bcdfdd398b874650cccd3edd552674e5d (diff) | |
parent | 593f798a0b463f45e00a207e4fe4b8cc82dedc35 (diff) |
Merge pull request #1107 from diogoosorio/develop
Fix issue #1080
-rw-r--r-- | system/libraries/Email.php | 7 | ||||
-rw-r--r-- | user_guide_src/source/changelog.rst | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php index c8a5b41af..8d839d0c9 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1359,6 +1359,7 @@ class CI_Email { if ( ! $this->$method()) { $this->_set_error_message('lang:email_send_failure_' . ($this->_get_protocol() === 'mail' ? 'phpmail' : $this->_get_protocol())); + return FALSE; } $this->_set_error_message('lang:email_sent', $this->_get_protocol()); @@ -1433,8 +1434,10 @@ class CI_Email { return FALSE; } - $this->_smtp_connect(); - $this->_smtp_authenticate(); + if ( ! $this->_smtp_connect() OR ! $this->_smtp_authenticate()) + { + return FALSE; + } $this->_send_command('from', $this->clean_email($this->_headers['From'])); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 9a7fc814c..f00021cd9 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -129,6 +129,7 @@ Bug fixes for 3.0 - Fixed a bug (#804) - Profiler library was trying to handle objects as strings in some cases, resulting in warnings being issued by htmlspecialchars(). - Fixed a bug (#1101) - MySQL/MySQLi result method field_data() was implemented as if it was handling a DESCRIBE result instead of the actual result set. - Fixed a bug in Oracle's :doc:`Database Forge Class <database/forge>` method _create_table() where it failed with AUTO_INCREMENT as it's not supported. +- Fixed a bug (#1080) - When using the SMTP protocol, the :doc:`Email Library <libraries/email>` send() method was returning TRUE even if the connection/authentication against the server failed. Version 2.1.1 ============= |