Exemplo n.º 1
0
 function filterBounces($Mail, $checkHeader = 1, $checkBody = 1, $returnOnlyBounces = 0)
 {
     /*
     Uebernimmt ein Array fuer eine einzelne Mail (aus class mMail ... getMail()] und prueft wahlweise Header und /oder Body auf Bounces...und gibt dieses Array 'gefiltert' zurueck
     */
     $Bounce = array();
     $Bounce_Head = array();
     $Bounce_Body = array();
     $mc = count($Mail);
     for ($mcc = 0; $mcc < $mc; $mcc++) {
         if (isset($Mail[$mcc])) {
             $is_bouncemail = false;
             $Message = $Mail[$mcc];
             //Array
             //header checken?
             if ($checkHeader == 1) {
                 $Bounce_Head = $this->checkHeader($Message['header']);
                 //adressen mit falscher syntax rauswerfen
                 $Bounce_Head = $this->removeInvalidEmails($Bounce_Head);
             }
             //body checken?
             if ($checkBody == 1) {
                 $Bounce_Body = $this->checkBody($Message['body']);
                 //adressen mit falscher syntax rauswerfen
                 $Bounce_Body = $this->removeInvalidEmails($Bounce_Body);
             }
             //wenn was gefunden wurde... ist der array nicht leer, also ist es eine potentielle boncemail
             $Mail[$mcc]['is_bouncemail'] = 0;
             if (count($Bounce_Head) || count($Bounce_Body)) {
                 $is_bouncemail = true;
                 $Mail[$mcc]['is_bouncemail'] = 1;
             }
             //wenn nur bounces zurueckgeliefert werden sollen, und es ist keines, dann eintrag loeschen
             if ($returnOnlyBounces == 1 && !$is_bouncemail) {
                 unset($Mail[$mcc]);
             }
             if ($returnOnlyBounces == 0 || $returnOnlyBounces == 1 && $is_bouncemail) {
                 //array erzeigen aus den gefundenen adressen in head und body
                 $Bounce = array_merge($Bounce_Head, $Bounce_Body);
                 //hier unifying, da wir pro mail jede adresse nur einmal auswerten muessen.
                 $Bounce = unify_array($Bounce);
                 //Array in der Message Speichern
                 $Mail[$mcc]['bounce'] = $Bounce;
             }
         }
     }
     //arraay neu ordnen
     $Mail = array_values($Mail);
     return $Mail;
 }
Exemplo n.º 2
0
if (DEBUG_LANG && (DEBUG_LANG_LEVEL == 2 || DEBUG_LANG_LEVEL == 3)) {
    $debug_not_translated = unify_array($debug_not_translated);
    $_MAIN .= "<div><b><font color=\"red\">NOT TRANSLATED:</font></b><font size=-2>";
    foreach ($debug_not_translated as $word) {
        $_MAIN .= "<br>" . $word;
    }
    $_MAIN .= "</font></div>";
    unset($debug_not_translated);
    $debug_same_translated = unify_array($debug_same_translated);
    $_MAIN .= "<br><div><b><font color=\"orange\">TRANSLATED WITH SAME STRING:</font></b><font size=-2>";
    foreach ($debug_same_translated as $word) {
        $_MAIN .= "<br>" . $word;
    }
    $_MAIN .= "</font></div>";
    unset($debug_same_translated);
    $debug_translated = unify_array($debug_translated);
    $_MAIN .= "<br><div><b><font color=\"green\">TRANSLATED:</font></b><font size=-2>";
    foreach ($debug_translated as $word) {
        $_MAIN .= "<br>" . $word;
    }
    $_MAIN .= "</font></div>";
    unset($debug_translated);
}
$_Tpl->setTemplatePath(TM_TPLPATH . "/" . $Style);
$_Tpl->setParseValue("_HEAD_HTML", $_HEAD_HTML);
$_Tpl->setParseValue("_HEAD", $_HEAD);
$_Tpl->setParseValue("_MAIN", $_MAIN);
$_Tpl->setParseValue("_FOOT", $_FOOT);
$_Tpl->setParseValue("_FOOTER", $_FOOTER);
$_Tpl->setParseValue("_MENU", $_MENU);
if ($logged_in) {
/* check Homepage for Updates and more Infos                                    */
/* Besuchen Sie die Homepage fuer Updates und weitere Infos                     */
/********************************************************************************/
$Bounces = array();
$Mail = array();
$bcmatch = 0;
for ($mcc = 0; $mcc < $mc; $mcc++) {
    $Mail = $Bounce->filterBounces($Mailer->getMail($mailno[$mcc]), $checkHeader, $checkBody);
    //$Messages , checkHeader=1, checkBody, returnOnlyBounces..., filter to:
    if (!empty($Mail[0]['bounce'])) {
        $Bounces = array_merge($Bounces, $Mail[0]['bounce']);
        $bcmatch++;
    }
}
$bctotal = count($Bounces);
$Bounces = unify_array($Bounces);
$bc = count($Bounces);
$_MAIN_OUTPUT .= "<br>" . sprintf(___("Es wurden %s Mails durchsucht."), $mc) . "<br>" . sprintf(___("%s Mails ergaben einen Treffer."), $bcmatch) . "<br>" . sprintf(___("Es wurden aus %s Adressen %s (eindeutige) potentiell fehlerhafte Adressen erkannt."), $bctotal, $bc);
if ($bc) {
    //bc>0
    $_MAIN_OUTPUT .= "<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" width=100%>";
    $_MAIN_OUTPUT .= "<thead>" . "<tr>" . "<td></td>" . "<td>" . ___("Adresse") . "</td>" . "<td>" . ___("Details") . "</td>" . "</thead>" . "<tbody>";
    for ($bcc = 0; $bcc < $bc; $bcc++) {
        $search['email'] = $Bounces[$bcc];
        $search['email_exact_match'] = true;
        $ADR = $ADDRESS->getAdr(0, 0, 0, 0, $search, "", 0, 0);
        if ($bcc % 2 == 0) {
            $bgcolor = $row_bgcolor;
        } else {
            $bgcolor = $row_bgcolor2;
        }