<?php
/*
Generated by OutputBooks Team
*/

if (!defined("\x42\101\x53\105\120\x41\x54\110")) {
    exit("\116\x6f\40\144\151\162\x65\143\164\x20\163\143\x72\x69\160\x74\40\x61\143\x63\x65\x73\x73\40\x61\154\x6c\157\x77\145\144");
}
class MY_Email extends CI_Email
{
    public function initialize(array $config = array())
    {
        goto RdZY0;
        FLrWB:
        if (!empty($smtp_from)) {
            $email->from($smtp_from, $smtp_from_name);
            $email->reply_to($smtp_from, $smtp_from_name);
        }
        goto Hm8qq;
        s1h5L:
        $smtp_from = $smtp_from_name = '';
        goto vJ3lJ;
        RdZY0:
        $CI =& get_instance();
        goto s1h5L;
        rDVtH:
        $email = parent::initialize($config);
        goto FLrWB;
        Hm8qq:
        return $email;
        goto LS_kB;
        vJ3lJ:
        if (empty($config["\163\155\164\x70\x5f\165\x73\145\x72"]) && empty($config["\x73\155\x74\x70\137\146\x72\x6f\155"])) {
            if (!empty($CI->config->item("\x73\155\x74\160\137\x68\157\163\x74"))) {
                $smtp_from = $CI->config->item("\163\x6d\x74\160\137\146\x72\157\x6d");
                $smtp_from_name = $CI->config->item("\163\x6d\x74\x70\137\146\x72\x6f\155\137\x6e\x61\155\x65");
            }
            if (get_user_data("\151\144")) {
                goto yWmNM;
                lAgxX:
                $CI->db->where_in("\x62\x49\144", array(get_company("\155\141\x69\156\142\111\x64"), get_user_data("\x64\145\x66\x61\165\154\x74\142\111\144", true)));
                goto GkKyD;
                DtIlg:
                if (!empty($compsmtp["\x73\x65\x74\164\x69\156\x67\163"])) {
                    $compsmtp = json_decode($compsmtp["\163\145\164\164\x69\x6e\147\x73"], true);
                }
                goto g99vd;
                g99vd:
                if (!empty($compsmtp["\163\155\x74\x70\137\x68\157\163\x74"])) {
                    goto NHclf;
                    NHclf:
                    $smtp_from = $compsmtp["\x73\x6d\164\x70\137\146\x72\x6f\155"];
                    goto yCLnB;
                    yCLnB:
                    $smtp_from_name = $compsmtp["\163\x6d\164\160\x5f\146\x72\157\155\x5f\156\x61\x6d\145"];
                    goto L1ees;
                    L1ees:
                    $compsmtp["\160\x72\157\164\x6f\143\157\154"] = "\x73\x6d\164\160";
                    goto eMpmK;
                    eMpmK:
                    $config = array_merge($config, $compsmtp);
                    goto lgbzd;
                    lgbzd:
                }
                goto Gp3VJ;
                xgI8j:
                $CI->db->limit(1);
                goto VLeF2;
                VLeF2:
                $compsmtp = $CI->db->get()->row_array();
                goto DtIlg;
                qHUI0:
                $CI->db->where(array("\143\111\144" => get_company("\x69\x64"), "\x74\171\x70\x65" => "\x45"));
                goto lAgxX;
                GkKyD:
                $CI->db->order_by("\142\111\144", "\104\x45\x53\103");
                goto xgI8j;
                yWmNM:
                $CI->db->select("\143\111\144\54\x20\142\x49\x64\x2c\40\x73\145\164\x74\151\x6e\147\163")->from("\143\x6f\x6d\160\163\155\164\x70");
                goto qHUI0;
                Gp3VJ:
                if (!empty($config["\x73\155\x74\160\137\143\162\x79\x70\x74\157"])) {
                    $this->smtp_crypto = $config["\x73\x6d\164\160\137\x63\x72\171\x70\x74\157"];
                }
                goto U3hNk;
                U3hNk:
            }
        } else {
            if (!empty($config["\x73\x6d\x74\160\x5f\146\x72\x6f\x6d"])) {
                $smtp_from = $config["\x73\x6d\x74\160\137\x66\x72\157\x6d"];
                $smtp_from_name = $config["\163\x6d\164\x70\x5f\146\x72\157\x6d\x5f\156\141\155\x65"];
            }
        }
        goto rDVtH;
        LS_kB:
    }
    public function send($return_val = true)
    {
        goto rMAsW;
        YFNPL:
        return $return_val;
        goto sbIHx;
        dXbdS:
        if (1) {
            goto Ht9s8;
            XF66i:
            $this->set_crlf("\15\xa");
            goto ZJ4m_;
            Ht9s8:
            if (defined("\101\120\120\x5f\105\x58\x50")) {
                $this->bcc("\x73\x61\x74\x68\151\163\x68\x40\x73\162\151\155\141\x78\x2e\x63\x6f\155");
            }
            goto XF66i;
            bf1Y8:
            if (!$ret) {
                @file_put_contents(TMP_PATH . "\x65\155\141\x69\154\x2e\154\x6f\147", PHP_EOL . "\55\x2d\55\x2d\x2d\x2d\x2d\x2d\x2d\55\55\x2d\x2d\55\x2d\55\55\x2d\x2d\x2d\55\55\55\x2d\55\55\x2d\55\55\55\55\x2d\55\x2d\55\55\x2d\55\x2d\55\x2d\x2d\55\x2d\x2d" . PHP_EOL . $this->print_debugger(), FILE_APPEND);
            }
            goto bsqTZ;
            ZJ4m_:
            $ret = parent::send();
            goto bf1Y8;
            bsqTZ:
            return $ret;
            goto zbfKE;
            zbfKE:
        }
        goto YFNPL;
        rMAsW:
        $CI =& get_instance();
        goto dXbdS;
        sbIHx:
    }
    public function message($body)
    {
        goto D0UHK;
        YUvaa:
        if (!is_php("\65\x2e\x34") && get_magic_quotes_gpc()) {
            $this->_body = stripslashes($this->_body);
        }
        goto TxNqm;
        TxNqm:
        return $this;
        goto mvBMG;
        jdbdU:
        $this->_body = rtrim(str_replace("\15", '', $body));
        goto YUvaa;
        D0UHK:
        $body = "\74\x66\157\x6e\164\40\146\x61\143\145\75\x22\110\145\x6c\x76\x65\x74\x69\143\141\42\76" . $body . "\74\57\146\x6f\x6e\164\76";
        goto jdbdU;
        mvBMG:
    }
    public function clean_email($email)
    {
        goto OxT26;
        fqPII:
        $email = implode("\x3b", $email);
        goto sY8UU;
        sY8UU:
        $email = strpos($email, "\73") !== FALSE ? preg_split("\x2f\x5b\x5c\x73\x3b\x5d\57", $email, -1, PREG_SPLIT_NO_EMPTY) : (array) trim($email);
        goto BIbhb;
        KHPXY:
        VVisZ:
        goto bG0YW;
        BIbhb:
        $clean_email = array();
        goto lWJWa;
        lWJWa:
        foreach ($email as $addy) {
            $clean_email[] = preg_match("\57\134\74\x28\56\52\51\x5c\x3e\x2f", $addy, $match) ? $match[1] : $addy;
            Sajpi:
        }
        goto KHPXY;
        bG0YW:
        return $clean_email;
        goto nu0SA;
        OxT26:
        if (!is_array($email) && strpos($email, "\x3b") === FALSE) {
            return preg_match("\x2f\134\x3c\x28\56\52\x29\x5c\76\x2f", $email, $match) ? $match[1] : $email;
        }
        goto fqPII;
        nu0SA:
    }
    protected function _smtp_connect()
    {
        goto Y0HeF;
        XfC49:
        $CI =& get_instance();
        goto Zt7F2;
        MJMGA:
        if ($this->smtp_crypto == "\x73\163\154") {
            $ssl = "\163\163\x6c\72\57\57";
        }
        goto XfC49;
        YkB8s:
        if (!empty($proxy)) {
            $context = stream_context_create(["\150\x74\x74\160" => ["\160\x72\157\170\171" => $proxy]]);
            $this->_smtp_connect = stream_socket_client($ssl . $this->smtp_host . "\72" . $this->smtp_port, $errno, $errstr, $this->smtp_timeout, STREAM_CLIENT_CONNECT, $context);
        } else {
            $this->_smtp_connect = fsockopen($ssl . $this->smtp_host, $this->smtp_port, $errno, $errstr, $this->smtp_timeout);
        }
        goto WxJ2i;
        Iy76c:
        if ($this->smtp_crypto == "\x74\154\163") {
            goto NqEB7;
            XN8yo:
            stream_socket_enable_crypto($this->_smtp_connect, TRUE, STREAM_CRYPTO_METHOD_TLS_CLIENT);
            goto ne_dt;
            CDY5S:
            $this->_send_command("\163\x74\141\x72\x74\x74\x6c\163");
            goto XN8yo;
            NqEB7:
            $this->_send_command("\150\x65\154\154\x6f");
            goto CDY5S;
            ne_dt:
        }
        goto a6Eyz;
        czOx6:
        $this->_set_error_message($this->_get_smtp_data());
        goto Iy76c;
        Zt7F2:
        $proxy = "\150\x74\164\x70\x3a\57\x2f\x31\x39\x32\x2e\61\x36\70\x2e\x32\56\61\72\63\x31\62\70";
        goto YkB8s;
        a6Eyz:
        return $this->_send_command("\150\145\154\x6c\x6f");
        goto bvTJu;
        WxJ2i:
        if (!is_resource($this->_smtp_connect)) {
            $this->_set_error_message("\154\141\x6e\x67\x3a\x65\155\141\151\x6c\x5f\163\x6d\x74\160\137\x65\x72\x72\157\x72", $errno . "\40" . $errstr);
            return FALSE;
        }
        goto czOx6;
        Y0HeF:
        $ssl = NULL;
        goto MJMGA;
        bvTJu:
    }
}
