Ok, I just want to improve the best answer here. The loan goes to @Tekniskt, and the only difference here is that the parameters that you may have in /application/config/email.php are ignored, which hurts, especially if you use the STMP user settings.
Here is the complete code for the MY_Email.php class, which I improved from the answer above:
class MY_Email extends CI_Email { public function __construct($config = array()) { if (count($config) > 0) { $this->initialize($config); } else { $this->_smtp_auth = ($this->smtp_user == '' AND $this->smtp_pass == '') ? FALSE : TRUE; $this->_safe_mode = ((boolean)@ini_get("safe_mode") === FALSE) ? FALSE : TRUE; } log_message('debug', "Email Class Initialized"); }
Hope this helps! :)
I performed my test, and now it seems that /config/email.php is turned on and the settings are passed properly.
Greetings and thanks for the answer! :)
source share