better error messages for sendmail failure
diff --git a/system/language/english/email_lang.php b/system/language/english/email_lang.php
index 9324277..e3bd113 100644
--- a/system/language/english/email_lang.php
+++ b/system/language/english/email_lang.php
@@ -17,6 +17,7 @@
$lang['email_smtp_auth_un'] = "Failed to authenticate username. Error: %s";
$lang['email_smtp_auth_pw'] = "Failed to authenticate password. Error: %s";
$lang['email_smtp_data_failure'] = "Unable to send data: %s";
+$lang['email_exit_status'] = "Exit status code: %s";
/* End of file email_lang.php */
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 89d0976..99a5ea3 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1549,8 +1549,9 @@
$status = $status >> 8 & 0xFF;
}
- if ($status == 0)
+ if ($status != 0)
{
+ $this->_set_error_message('email_exit_status', $status);
$this->_set_error_message('email_no_socket');
return FALSE;
}