diff options
-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 ============= |