if (!DEMO) { $ADDRESS->delAdr($adr_id); } $_MAIN_MESSAGE .= "<br>" . ___("Eintrag wurde gelöscht."); } //del single if ($set == "check") { $ADR_check = $ADDRESS->getAdr($adr_id); $_MAIN_MESSAGE .= "<br>" . ___("Eintrag wird geprüft:") . " <br><em>" . display($ADR_check[0]['email']) . "</em>"; $check_mail = checkEmailAdr($ADR_check[0]['email'], $EMailcheck_Intern); if (!$check_mail[0]) { $_MAIN_MESSAGE .= "<br><font color=\"red\">" . ___("Die E-Mail-Adresse ist nicht gültig.") . "</font>"; $_MAIN_MESSAGE .= "<br><font color=\"red\">" . ___("E-Mail wurde als fehlerhaft markiert.") . "</font>"; $_MAIN_MESSAGE .= " " . tm_icon($STATUS['adr']['statimg'][9], display($STATUS['adr']['status'][9])) . " \"<b>" . display($STATUS['adr']['status'][9]) . "</b>\""; $ADDRESS->setStatus($adr_id, 9); $ADDRESS->addMemo($adr_id, $check_mail[1]); } else { $_MAIN_MESSAGE .= "<br><font color=\"green\">" . ___("OK") . "</font>"; } $ADDRESS->markRecheck($adr_id, 0); $_MAIN_MESSAGE .= "<br><pre><em>" . display($check_mail[1]) . "</em></pre>"; } //check single if ($user_is_manager && $set == "delete_history" && $doit == 1) { if (!DEMO) { $QUEUE->clearH(array("adr_id" => $adr_id)); } $_MAIN_MESSAGE .= "<br>" . ___("Historie wurde gelöscht."); } //del history single if ($user_is_manager && $set == "blacklist") {
$ADDRESS = new tm_ADR(); $ADR = $ADDRESS->getAdr($a_id); if (isset($ADR[0])) { //https://sourceforge.net/tracker/?func=detail&aid=3114571&group_id=190396&atid=933192 //only set view status if not waiting status or unsubscribed // !5 && !11 if ($ADR[0]['status'] != 5 && $ADR[0]['status'] != 11) { $ADDRESS->setStatus($a_id, 4); //view } //adr view counter ++ $ADDRESS->addView($a_id); //view //save memo $created = date("Y-m-d H:i:s"); $memo = "viewed (" . $NL[0]['subject'] . ")"; $ADDRESS->addMemo($a_id, $memo); } //isset ADR[0] } //checkid($a_id) } //wenn kein trackimage erzeugt werden soll, also kein newsletter gefunden wurde, blank erzeugen if (!$create_track_image) { $Image = makeBlankImage(4, 7); } //andernfalls, falls track image erzeugt werden soll, abhaengig vom newsletter... if ($create_track_image) { //track image auslesen $imagefilename = $NL[0]['track_image']; //wenn "_global": if ($imagefilename == "_global") {
//unsubscribe! } $created = date("Y-m-d H:i:s"); //im memo speichern wir den namen des newsletter etc. $memo = "unsubscribed"; $NEWSLETTER = new tm_NL(); $NL = $NEWSLETTER->getNL($nl_id); if (count($NL) > 0) { $memo .= " (" . $NL[0]['subject'] . ")"; } //set status adresse, set editor... $author = "unsubscribe"; //always unsubscribe ... if ($ADDRESS->unsubscribe($ADR[0]['id'], $author)) { $ADDRESS->setAktiv($ADR[0]['id'], 0); $ADDRESS->addMemo($ADR[0]['id'], $memo); //unsubscribed if ($C[0]['unsubscribe_action'] == "blacklist" || $C[0]['unsubscribe_action'] == "blacklist_delete") { //add adr to blacklist if (!$BLACKLIST->isBlacklisted($ADR[0]['email'], "email", 0)) { //only_active=0, also alle, nicht nur aktive, was default waere $BLACKLIST->addBL(array("siteid" => TM_SITEID, "expr" => $ADR[0]['email'], "aktiv" => 1, "type" => "email")); } } if ($C[0]['unsubscribe_action'] == "delete" || $C[0]['unsubscribe_action'] == "blacklist_delete") { $ADDRESS->delAdr($ADR[0]['id']); } if ($C[0]['notify_unsubscribe'] == 1) { //email bei subscrption an admin.... $SubscriptionMail_Subject = "Tellmatic: Abmeldung / Unsubscribe"; $SubscriptionMail_HTML = "";
$h_error = true; //$a_error=true;wir belassen alten status!!! } //adr aktiv } // if !skipped ...etc if (!$check_mail[0] || $ADR[0]['errors'] > $C[0]['max_mails_retry']) { $a_status = 9; //fehlerhafte adr o. ruecklaeufer $a_error = true; $h_status = 4; //fehler $h_error = true; //adr add memo: $log_msg = "ERROR: invalid email (" . $ADR[0]['email'] . ") [" . $check_mail[1] . "] or reached max errors [" . $ADR[0]['errors'] . " of max. " . $C[0]['max_mails_retry'] . "]"; $ADDRESS->addMemo($H[$bcc]['adr_id'], "send_it: " . $log_msg); send_log($log_msg); } //wenn errors > max errors oder !check_mail if ($a_error) { $log_msg = "ERROR: set adr to status=" . $a_status; $ADDRESS->addMemo($H[$bcc]['adr_id'], "send_it: " . $log_msg); send_log($log_msg); //$ADDRESS->setStatus($H[$bcc]['adr_id'],$a_status); $ADDRESS->setStatus($ADR[0]['id'], $a_status); $ADDRESS->setAError($ADR[0]['id'], $ADR[0]['errors'] + 1); //fehler um 1 erhoehen //ADR Status $log_msg = "adr errors (new): " . ($ADR[0]['errors'] + 1); $ADDRESS->addMemo($H[$bcc]['adr_id'], "send_it: " . $log_msg); send_log($log_msg);
} else { //wenn errors limit noch nicht ueberschritten //dann als sendefehler markieren //das auch nur wenn status nicht warten ist. //oben ist status warten ok, da der fehler gezaehlt wird, kommen so und so viele bouncemails wegen der optin mail, so wird er deaktiviert etc und als fehelrhaft markiert if ($A[0]['status'] != 5) { $ADDRESS->setStatus($A[0]['id'], 10); } } } else { $protocol .= " -- " . ___("ist bereits abgemeldet (unsubscribed).") . "\n"; } // if status !=11 //} // else {} if ($C[0]['bounceit_action'] != "delete") { $ADDRESS->addMemo($A[0]['id'], $protocol); } echo $protocol; } } else { //isset A echo sprintf(___("%s ist nicht bekannt."), $Bounces[$bcc]) . "\n"; } //isset A flush(); ob_flush(); } //for $bcc echo "Logfiles: " . $BounceDel_Filename . " / " . $Export_Filename; fclose($fp); fclose($fpdel);
for ($acc = 0; $acc < $ac; $acc++) { $protocol = ""; $protocol .= $ADR[$acc]['email'] . "\n"; $ADR_C = $ADDRESS->getAdr($ADR[$acc]['id']); //nochmal kurz pruefen ob recheck noch 1 ist, sonst pruefen wir ggf. doppelt if ($ADR_C[0]['recheck'] == 1) { //recheck auf 0 setzen $ADDRESS->markRecheck($ADR[$acc]['id'], 0); //pruefen $check_mail = checkEmailAdr($ADR[$acc]['email'], $C[0]['emailcheck_checkit'], $C[0]['checkit_from_email']); if (!$check_mail[0]) { $protocol .= ___("Error, e-mail marked as failed.") . "\n"; $protocol .= $check_mail[1] . "\n"; $ADDRESS->setStatus($ADR[$acc]['id'], 9); #see Stats.inc.php $ADDRESS->addMemo($ADR[$acc]['id'], $protocol); } else { #opt.: als OK markieren wenn status 9 war, error a, oder 10, error s if ($ADR[$acc]['id'] == 9 || $ADR[$acc]['id'] == 10) { if ($C[0]['checkit_adr_reset_status'] == 1) { $ADDRESS->setStatus($ADR[$acc]['id'], 2); #2:ok, checked, #see Stats.inc.php $protocol .= ___("OK, e-mail marked as ok.") . "\n"; } } else { $protocol .= ___("OK, but e-mail status not changed.") . "\n"; } if ($C[0]['checkit_adr_reset_error'] == 1) { $ADDRESS->setAError($ADR[$acc]['id'], 0); $protocol .= ___("OK, reset errors to 0.") . "\n"; }