CI = &get_instance(); } function initialize($settings = false) { if (!$settings) { //$settings = $this->CI->config->item('email'); $conf = new JConfig(); $settings['host'] = $conf->smtphost; $settings['port'] = $conf->smtpport; $settings['helo'] = null; $settings['auth'] = $conf->smtpauth; $settings['user'] = $conf->smtpuser; $settings['pass'] = $conf->smtppass; /*$settings['host'] = 'localhost'; $settings['port'] = 25; $settings['helo'] = null; $settings['auth'] = true; $settings['user'] = 'www.smtp@cadline.hu'; $settings['pass'] = 'Chieng0t';*/ } $this->setSMTPParams($settings['host'], $settings['port'], $settings['helo'], $settings['auth'], $settings['user'], $settings['pass']); $this->setHTMLCharset('UTF-8'); $this->setHeadCharset('UTF-8'); $this->setHTMLEncoding(new EightBitEncoding()); } function addOfficialImages() { $this->addEmbeddedImage(new fileEmbeddedImage('../public/img/mail/title.jpg')); $this->addEmbeddedImage(new fileEmbeddedImage('../public/img/mail/footer.jpg')); } function addImage($path) { $this->addEmbeddedImage(new fileEmbeddedImage('../public/img/' . $path)); } function clear() { $this->is_built = false; $this->setHTML(null); $this->setFrom(null); } function message($html) { $tomb['�'] = 'á'; $tomb['�'] = 'Á'; $tomb['�'] = 'é'; $tomb['�'] = 'É'; $tomb['�'] = 'ó'; $tomb['�'] = 'Ó'; $tomb['�'] = 'ö'; $tomb['�'] = 'Ö'; $tomb['�'] = 'ő'; $tomb['�'] = 'Ő'; $tomb['�'] = 'ú'; $tomb['�'] = 'Ú'; $tomb['�'] = 'ü'; $tomb['�'] = 'Ü'; $tomb['�'] = 'ű'; $tomb['�'] = 'Ű'; $tomb['�'] = 'í'; $tomb['�'] = 'Í'; $string = $html; foreach ($tomb as $k => $v) { $string = str_replace($k, $v, $string); } $this->setHTML($string); } function from($from) { $this->setFrom($from); } function subject($subj) { $this->setSubject($subj); } }