private static function _sendmail($mailfrom, $to, $cc, $bcc, $subject, $html, $files = array())
    {
        global $PPHP;

        $msg = new \Email();
        $msg->X_Mailer_Info = 'PyritePHP v1.0';
        $msg->to = $to;
        if ($cc && $cc !== '') {
            $msg->cc = $cc;
        };
        if ($bcc && $bcc !== '') {
            $msg->bcc = $bcc;
        };
        $msg->from = $PPHP['config']['global']['mail_from'];
        if ($mailfrom) {
            $msg->reply_to = $mailfrom;
        };
        $msg->subject = $subject;
        $msg->addTextHTML(filter('html_to_text', $html), $html);
        foreach ($files as $file) {
            $msg->addFile("{$PPHP['dir']}/{$file['path']}/{$file['name']}", $file['name'], $file['type']);
        };
        return ($msg->send() === 0);
    }