/** * Constructor method * * @access public * @return void */ function __construct($config = array()) { parent::__construct($config); //set mail protocol $config['protocol'] = Settings_class::get('mail_protocol'); //set a few config items (duh) $config['mailtype'] = "html"; $config['charset'] = "utf-8"; $config['crlf'] = "\r\n"; $config['newline'] = "\r\n"; //sendmail options if (Settings_class::get('mail_protocol') == 'sendmail') { if (Settings_class::get('mail_sendmail_path') == '') { //set a default $config['mailpath'] = '/usr/sbin/sendmail'; } else { $config['mailpath'] = Settings_class::get('mail_sendmail_path'); } } //smtp options if (Settings_class::get('mail_protocol') == 'smtp') { $config['smtp_host'] = Settings_class::get('mail_smtp_host'); $config['smtp_user'] = Settings_class::get('mail_smtp_user'); $config['smtp_pass'] = Settings_class::get('mail_smtp_pass'); $config['smtp_port'] = Settings_class::get('mail_smtp_port'); } $this->initialize($config); }
function __construct($config = array()) { parent::__construct($config); $this->CI =& get_instance(); $this->setFromEmail(Settings_class::get('server_email')); $this->setEmailTitle($GLOBALS['global']['SITE_ADMIN']['email']); }