예제 #1
0
         $SubscriptionMail_Subject = "Tellmatic: Abmeldung / Unsubscribe";
         $SubscriptionMail_HTML = "";
         $SubscriptionMail_HTML .= "<br><b>" . $created . "</b>\n" . "<br>'<b>" . $memo . "</b>'\n" . "<br>AID: <b>" . $ADR[0]['id'] . "</b>\n" . "<br>\n" . "<br>Folgender Benutzer hat sich aus der Verteilerliste ausgetragen und moechte kein Newsletter mehr erhalten:\n" . "<br>The following user has unsubscribed:\n" . "<ul>Daten:\n" . "<li>e-Mail: <b>" . $ADR[0]['email'] . "</b></li>\n" . "<li>F0: <b>" . $ADR[0]['f0'] . "</b></li>\n" . "<li>F1: <b>" . $ADR[0]['f1'] . "</b></li>\n" . "<li>F2: <b>" . $ADR[0]['f2'] . "</b></li>\n" . "<li>F3: <b>" . $ADR[0]['f3'] . "</b></li>\n" . "<li>F4: <b>" . $ADR[0]['f4'] . "</b></li>\n" . "<li>F5: <b>" . $ADR[0]['f5'] . "</b></li>\n" . "<li>F6: <b>" . $ADR[0]['f6'] . "</b></li>\n" . "<li>F7: <b>" . $ADR[0]['f7'] . "</b></li>\n" . "<li>F8: <b>" . $ADR[0]['f8'] . "</b></li>\n" . "<li>F9: <b>" . $ADR[0]['f9'] . "</b></li>\n" . "</ul>\n" . "<br>\n" . "Code: <b>" . $code . "</b>\n" . "<br>\n" . "<br>\n" . "Der Datensatz wurde de-aktiviert und markiert (Unsubscribed) und wurde ab sofort aus der Empfaengerliste ausgeschlossen.\n" . "<br>The Address has been deactivated and marked as unsubscribed and will be excluded from recipients list.\n";
         @SendMail_smtp($HOST[0]['sender_email'], $HOST[0]['sender_name'], $C[0]['notify_mail'], $HOST[0]['sender_name'], $SubscriptionMail_Subject, clear_text($SubscriptionMail_HTML), $SubscriptionMail_HTML, array(), $HOST);
         //fixed, now uses defaulthost
         //now use smtp directly
         //sendmail_smtp[0]=true/false [1]=""/errormessage
         if ($C[0]['unsubscribe_sendmail'] == 1) {
             //unsubscribe mail to subscriber
             $UnsubscribeMail_Subject = "Tellmatic: Abmeldung / Unsubscribe";
             $_Tpl_UnsubscribeMail = new tm_Template();
             $_Tpl_UnsubscribeMail->setTemplatePath(TM_TPLPATH);
             $_Tpl_UnsubscribeMail->setParseValue("EMAIL", $email);
             $_Tpl_UnsubscribeMail->setParseValue("DATE", date(TM_NL_DATEFORMAT));
             $UnsubscribeMail_HTML = $_Tpl_UnsubscribeMail->renderTemplate("Unsubscribe_mail.html");
             @SendMail_smtp($HOST[0]['sender_email'], $HOST[0]['sender_name'], $email, "<__" . $email . "__>", $UnsubscribeMail_Subject, clear_text($UnsubscribeMail_HTML), $UnsubscribeMail_HTML, array(), $HOST);
             //fixed, now uses defaulthost
             //now use smtp directly
             //sendmail_smtp[0]=true/false [1]=""/errormessage
         }
         $email = "";
     }
     //send notify
     $FMESSAGE .= ___("Ihre Adresse wurde aus unserem Verteiler entfernt.");
 } else {
     //unsubscribe()
     //sonstiger fehler
     $email = "";
     $FMESSAGE .= ___("Ein Fehler ist aufgetreten");
 }
 /*
예제 #2
0
    if (DEBUG) {
        $MESSAGE .= tm_debugmessage("rcpt-name: " . $RCPT_Name);
    }
    //we have to replace date before parsing {DATE} --> $date_sub
    if (DEBUG) {
        $MESSAGE .= tm_debugmessage("parse body");
    }
    $NLSubscribeMail[0]['body'] = str_replace("{DATE}", $date_sub, $NLSubscribeMail[0]['body']);
    $NLSubscribeMail[0]['body_text'] = str_replace("{DATE}", $date_sub, $NLSubscribeMail[0]['body_text']);
    //now parse newsletter:
    if ($NLSubscribeMail[0]['content_type'] == "html" || $NLSubscribeMail[0]['content_type'] == "text/html") {
        $SubscribeMail_HTML = $NEWSLETTER->parseNL(array('nl' => $NLSubscribeMail[0], 'adr' => $ADR[0], 'frm' => array('id' => $frm_id)), "html");
    }
    if ($NLSubscribeMail[0]['content_type'] == "text" || $NLSubscribeMail[0]['content_type'] == "text/html") {
        $SubscribeMail_TEXT = $NEWSLETTER->parseNL(array('nl' => $NLSubscribeMail[0], 'adr' => $ADR[0], 'frm' => array('id' => $frm_id)), "text");
    }
    //2do: create text part from html if nl is html only
    //convert2Text? in ClassNL... test
    //sendmail_smtp[0]=true/false [1]=""/errormessage
    if (DEBUG) {
        $MESSAGE .= tm_debugmessage("send mail to " . $ADR[0]['email']);
    }
    @SendMail_smtp($HOST[0]['sender_email'], $HOST[0]['sender_name'], $ADR[0]['email'], $RCPT_Name, $SubscribeMail_Subject, $SubscribeMail_TEXT, $SubscribeMail_HTML, array(), $HOST);
    if ($C[0]['notify_subscribe'] == 1) {
        if (DEBUG) {
            $MESSAGE .= tm_debugmessage("send notification mail to admin! " . $C[0]['notify_mail'] . " , " . $HOST[0]['sender_name']);
        }
        @SendMail_smtp($HOST[0]['sender_email'], $HOST[0]['sender_name'], $C[0]['notify_mail'], $HOST[0]['sender_name'], $SubscribeMail_Subject, $SubscribeMail_TEXT, $SubscribeMail_HTML, array(), $HOST);
    }
}
//use nl_doptin
예제 #3
0
function SendMail($from_address, $from_name, $to_address, $to_name, $subject, $text, $html, $AttmFiles = array(), $HOST = array())
{
    global $use_SMTPmail;
    //tm_lib!
    $return = false;
    //Name darf nicht = email sein und auch kein komma enthalten, plaintext!
    $to_name = str_replace($to_address, "", $to_name);
    $to_name = clear_text($to_name);
    $to_name = str_replace(",", "", $to_name);
    if ($use_SMTPmail) {
        if (SendMail_smtp($from_address, $from_name, $to_address, $to_name, $subject, $text, $html, $AttmFiles, $HOST)) {
            $return = true;
        }
    } else {
        if (SendMail_mail($from_address, $from_name, $to_address, $to_name, $subject, $text, $html, $AttmFiles)) {
            $return = true;
        }
    }
    return $return;
}
예제 #4
0
                }
                if ($H[$hcc]['status'] == 4) {
                    $hc_fail++;
                }
            }
            //$hc==0, no (more) entries
            //report
            //should use a template..... :P
            $G = $ADDRESS->getGroup($Q[$qcc]['grp_id']);
            $ReportMail_Subject = "Tellmatic: Q finished (QId: " . $Q[$qcc]['id'] . " / " . $Q[$qcc]['created'] . ") " . display($NL[0]['subject']) . " an " . display($G[0]['name']);
            $ReportMail_HTML = "";
            $created_date = $Q[$qcc]['created'];
            $sent_date = $created;
            $ReportMail_HTML .= "<br><b>" . $sent_date . "</b>" . "<br>Der Versand des Newsletter <b>" . display($NL[0]['subject']) . "</b> an die Gruppe <b>" . display($G[0]['name']) . "</b> ist abgeschlossen." . "<br>The Mailing for Newsletter <b>" . display($NL[0]['subject']) . "</b> to Group <b>" . display($G[0]['name']) . "</b> is finished." . "<br><ul>" . "Adressen/s:" . $hc . "<br>Gesendet/Sent: " . $hc_ok . "<br>Fehler/Errors:" . $hc_fail . "<br>versendet am/sent at: " . $sent_date . "<br>erstellt (nur versand vorbereitet)/created (prepared): " . $created_date . "<br>Log: " . $tm_URL_FE . "/" . $tm_logdir . "/" . $logfilename . "</ul>";
            if (!DEMO) {
                @SendMail_smtp($HOST[0]['sender_email'], $HOST[0]['sender_name'], $HOST[0]['sender_email'], $HOST[0]['sender_name'], $ReportMail_Subject, clear_text($ReportMail_HTML), $ReportMail_HTML, array(), $HOST);
            }
            //sendmail_smtp[0]=true/false [1]=""/errormessage
        }
        //hc==0
        //	}//q status 2 o 3
        send_log($qcc + 1 . " of {$qc} Qs");
        send_log("end");
    }
    //isset HOST[0]!!!!
    #send_log("write Log to ".$tm_URL_FE."/".$tm_logdir."/".$logfilename);
}
//$qcc
/*
QCC
*/
예제 #5
0
    if (DEMO) {
        $host_test = TRUE;
    }
}
//type==pop3/imap
//SMTP testen
if ($HOST_T[0]['type'] == "smtp") {
    if (!DEMO) {
        $TestMessage = "Hello,\n\n";
        $TestMessage .= "This is " . TM_APPTEXT . ".\n\n";
        $TestMessage .= "If you can read this message, testing the SMTP-Server '" . $HOST_T[0]['name'] . "' was successfull.\n\n";
        $TestMessage .= "Thank you for using " . TM_APPTEXT . ".\nv.";
        //new: !!!use sendmail_smtp!!! see Functions.inc
        #function SendMail_smtp($from_address,$from_name,$to_address,$to_name,$subject,$text,$html,$AttmFiles=Array(),$HOST=Array()) {}
        $subject_t = "Testing Tellmatic SMTP-Server " . $HOST_T[0]['name'];
        $smtp_err = SendMail_smtp($HOST_T[0]['sender_email'], $HOST_T[0]['sender_name'], $LOGIN->USER['email'], $LOGIN->USER['name'], $subject_t, $TestMessage, $TestMessage, $AttmFiles = array(), $HOST_T);
        if (!$smtp_err[0]) {
            $host_test = FALSE;
            $Error .= $smtp_err[1];
            #$email_obj->debug_msg;
        } else {
            $Error .= sprintf(___("Eine Testmail wurde an die E-Mail-Adresse %s %s gesendet."), $LOGIN->USER['name'], $LOGIN->USER['email']);
            $host_test = TRUE;
        }
    }
    //demo
    if (DEMO) {
        $Error .= sprintf(___("Eine Testmail wurde an die E-Mail-Adresse %s %s gesendet."), $LOGIN->USER['name'], $LOGIN->USER['email']);
        $host_test = TRUE;
    }
}