I'm extending the CI mail library for logging proposes, but when I send the mail, it goes trough the PHPMail a not trough the SMTP server that I have been declared in config/email.php
.
class MY_Email extends CI_Email {
protected $logDir;
private $_clr_subject = '';
private $_clr_msg = '';
public function __construct() {
parent::__construct();
$this->logDir = 'logs/mail';
}
function send($auto_clear = TRUE) {
$result = parent::send(FALSE);
//After send I will save all the log stuff
$this->_saveLog(true);
if ($result && $auto_clear) {
$this->clear();
}
return true;
}
[...]
}
So, I know that probably I'm doing something wrong, but I do not what...
Any help will be appreciated!