function sql_warn($warnmessage)
{
    global $sql_errormail;
    global $emailheaders;
    global $absolute_server_URI;
    $email_content = $warnmessage;
    $email_content .= "\n--------------------\n";
    $email_content .= print_r(debug_backtrace(), true);
    if (admin_errormail($sql_errormail, 'sql_warn', $email_content, $emailheaders)) {
        @mb_send_mail($sql_errormail, 'sql_warn: ' . $absolute_server_URI, $email_content, $emailheaders);
    }
}
Example #2
0
function sql_warn($warnmessage)
{
    global $opt;
    if ($opt['db']['error']['mail'] != '') {
        if (admin_errormail($opt['db']['error']['mail'], $opt['db']['warn']['subject'], $warnmessage . "\n" . print_r(debug_backtrace(), true), "From: " . $opt['mail']['from'])) {
            require_once $opt['rootpath'] . 'lib2/mail.class.php';
            $mail = new mail();
            $mail->name = 'sql_warn';
            $mail->subject = $opt['db']['warn']['subject'];
            $mail->to = $opt['db']['warn']['mail'];
            $mail->assign('warnmessage', $warnmessage);
            $mail->assign('trace', print_r(debug_backtrace(), true));
            $mail->send();
            $mail = null;
        }
    }
}
function sql_warn($warnmessage)
{
    global $sql_errormail;
    global $emailheaders;
    global $absolute_server_URI;
    $email_content = $warnmessage;
    $email_content .= "\n--------------------\n";
    $email_content .= print_r(debug_backtrace(), true);
    if (admin_errormail($sql_errormail, 'sql_warn', $email_content, $emailheaders)) {
        $sendMail = @mb_send_mail($sql_errormail, 'sql_warn: ' . $absolute_server_URI, $email_content, $emailheaders);
        if ($sendMail === false) {
            // @todo implement logging
            // throw new \RuntimeException('the E-Mail can not be send.');
        }
    }
}