Esempio n. 1
0
 //wenn status ok, also neu 1, gestartet 2 oder angehalten 5
 //dann neu eintrag in sendeliste/history, q_id, nl_id, grp_id, adr_id
 if ($Q[0]['status'] == 1 || $Q[0]['status'] == 2 || $Q[0]['status'] == 5) {
     $NL = $NEWSLETTER->getNL($Q[0]['nl_id'], 0, 0, 0, 0);
     if (DEBUG) {
         echo "\nNL:\n";
     }
     if (DEBUG) {
         print_r($NL);
     }
     //wenn das Newsletter auch wirklich aktiv ist......
     if ($NL[0]['aktiv'] == 1) {
         $_MAIN_MESSAGE .= "<br>&nbsp;&nbsp;'<b><em>" . display($NL[0]['subject']) . "</em></b>'";
         $_MAIN_MESSAGE .= "&nbsp;&nbsp;==&gt;&nbsp;&nbsp;'<b>" . display($GRP[0]['name']) . "</b>'";
         $hc_fastinsert = $QUEUE->addHQ(array('nl_id' => $Q[0]['nl_id'], 'q_id' => $Q[0]['id'], 'grp_id' => $Q[0]['grp_id'], 'host_id' => $Q[0]['host_id'], 'status' => 1, 'created' => date("Y-m-d H:i:s")));
         $hqtime = $HQTimer->MidResult();
         if (DEBUG) {
             $_MAIN_MESSAGE .= "\nhc_fastinsert:\n";
         }
         if (DEBUG) {
             $_MAIN_MESSAGE .= print_r($hc_fastinsert, TRUE);
         }
         if ($hc_fastinsert[0]) {
             if (DEBUG) {
                 $_MAIN_MESSAGE .= "<br>num rows:" . $hc_fastinsert[1] . "<br>affected rows:" . $hc_fastinsert[2];
             }
             $_MAIN_MESSAGE .= "<br>" . sprintf(___("%s Einträge eingefügt."), $hc_fastinsert[2]);
             $_MAIN_MESSAGE .= "<br>" . sprintf(___("Benötigte Zeit: %s Sekunden"), number_format($hqtime, 2, ".", ""));
             //status der Q und NL auf gestartet setzen!
             $NEWSLETTER->setStatus($Q[0]['nl_id'], 6);
             //start q?
Esempio n. 2
0
 //if massmail, we can cache body parts
 if ($massmail) {
     $email_obj->cache_body = 1;
 } else {
     $email_obj->cache_body = 0;
 }
 $max_mails = $max_mails_atonce * $max_mails_bcc;
 //maximale anzahl zu bearbeitender mails/empfaenger insgesamt! faktor max_mails_bcc
 send_log("creating list");
 //aktuel offene versandauftraege
 $H = $QUEUE->getHtoSend(0, 0, $max_mails, $Q[$qcc]['id']);
 //id , offset, limit, q_id !!!, ....
 $hc = count($H);
 //wieviel sendeeintraege
 send_log($hc . " Entrys found\n");
 $time = $T->MidResult();
 send_log("time: " . $time);
 send_log("working on max {$max_mails} addresses in {$max_mails_atonce} mails with {$max_mails_bcc} recipients for each mail");
 //wenn massenmailing, body hier schon parsen!!!
 if ($massmail) {
     //to fuer massenmailing
     send_log("prepare Massmail");
     $SUBJ = $NEWSLETTER->parseSubject(array('text' => $NL[0]['subject'], 'date' => date(TM_NL_DATEFORMAT)));
     //hmmm, we should use date from send_at in q!
     send_log("Subject: " . $NL[0]['subject']);
     send_log("Subject (parsed): " . $SUBJ);
     $email_obj->SetEncodedHeader("Subject", $SUBJ);
     //argh, this class forces us to add a to header which is definitely not needed if we have bcc or cc!!!
     $To = $HOST[0]['sender_email'];
     //wird $HOST!
     if (!empty($NL[0]['rcpt_name'])) {