Esempio n. 1
0
    // $nl->debugsql = 1;
    // $nl->setQuery('select * from rex_com_user where newsletter_last_id<>"'.$nl_id.'" and email<>"" and newsletter=1 LIMIT 50');
    $nl->setQuery('select * from rex_com_user where newsletter_last_id<>"' . $nl_id . '" and email<>"" and newsletter=1 and profile=' . $nl_filter_profile . ' and status=' . $nl_filter_status . ' LIMIT 50');
    if ($nl->getRows() > 0) {
        $i = "" . date("H:i:s") . "h Bitte noch nicht abbrechen. Automatischer Reload. Es werden noch weitere E-Mails versendet";
        ?>
<script>
			function win_reload(){ window.location.reload(); }
			setTimeout("win_reload()",5000); // Millisekunden 1000 = 1 Sek * 80
			</script><?php 
        $i .= "<br />An folgende E-Mails wurde der Newsletter versendet: ";
        $up = new rex_sql();
        foreach ($nl->getArray() as $userinfo) {
            $i .= ", " . $userinfo["email"];
            $up->setQuery('update rex_com_user set newsletter_last_id="' . $nl_id . '" where id=' . $userinfo["id"]);
            $r = rex_newsletter_sendmail($userinfo, $nl_from_email, $nl_from_name, $nl_subject, $nl_body_text, $nl_body_html);
            $nl->next();
        }
        $info[] = $i;
    } else {
        $info[] = "Alle eMails wurden verschickt";
    }
}
// ---------- Fehlermeldungen
if (count($error) > 0) {
    foreach ($error as $e) {
        echo rex_warning($e);
    }
}
if (count($info) > 0) {
    foreach ($info as $i) {
Esempio n. 2
0
            rex_newsletter_sendmail($userinfo, $mail_aid, $mail_reply, $mail_subject, $to_code);
            $nl->next();
        }
    } else {
        $msg = "Bitte geben Sie alle Daten ein!";
    }
    // ********************************************************* TESTMAIL
} else {
    if ($method == "start") {
        // ----- Testmail verschicken
        if ($mail_reply != "" and $mail_subject != "" and $mail_aid > 0 and $test_email != "" and $test_name != "" and $test_firstname != "") {
            $userinfo = array();
            $userinfo["email"] = $test_email;
            $userinfo["name"] = $test_name;
            $userinfo["firstname"] = $test_firstname;
            rex_newsletter_sendmail($userinfo, $mail_aid, $mail_reply, $mail_subject);
            // Testmail verschicken..
            $msg = "Testmail wurde versandt!";
        } else {
            $method = "";
            $msg = "Bitte geben Sie alle Daten ein!";
        }
    }
}
if ($msg != "") {
    echo '<p class="rex-message rex-warning"><span>' . $msg . '</span></p>';
}
?>

<table class="rex-table" cellpadding="5" cellspacing="1">
	<form action="index.php" method="get" name="REX_FORM">