#1080 - Check if the SMTP connection and authentication were successfull.
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index c8a5b41..39a7059 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1359,6 +1359,7 @@
 		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 @@
 			return FALSE;
 		}
 
-		$this->_smtp_connect();
-		$this->_smtp_authenticate();
+		if ( !($this->_smtp_connect() && $this->_smtp_authenticate()) )
+		{
+			return FALSE;
+		}
 
 		$this->_send_command('from', $this->clean_email($this->_headers['From']));