コード例 #1
0
 if (DEBUG) {
     $MESSAGE .= tm_debugmessage(print_r($ADR, TRUE));
 }
 //now send mails and show messages
 if (!$adr_exists && $FRM[0]['double_optin'] == 1) {
     /********************************************************************************/
     //send double optin confirmation mail with subscribe/confirmation link
     $nl_id_index = "nl_id_doptin";
     if (DEBUG) {
         $MESSAGE .= tm_debugmessage("new record, send double optin confirmation email: subscribe_doptin_mail, nl_id_index=" . $nl_id_index);
     }
     require_once TM_INCLUDEPATH . "/subscribe_mail.inc.php";
     /********************************************************************************/
     //show double optin message
     #$MESSAGE.=display($FRM[0]['message_doptin']);
     $MESSAGE .= display($NEWSLETTER->parseSubject(array('text' => $FRM[0]['message_greeting'], 'adr' => $ADR[0], 'date' => $date_sub)));
 }
 //send greeting mail if adr not exists and doptin not set in form
 if (!$adr_exists && $FRM[0]['double_optin'] != 1) {
     /********************************************************************************/
     //send greeting mail
     $nl_id_index = "nl_id_greeting";
     if (DEBUG) {
         $MESSAGE .= tm_debugmessage("new record, no double optin, send greeting email: subscribe_mail, nl_id_index=" . $nl_id_index);
     }
     require_once TM_INCLUDEPATH . "/subscribe_mail.inc.php";
     /********************************************************************************/
     //show welcome message
     #$MESSAGE.=display($FRM[0]['message_greeting']);
     $MESSAGE .= display($NEWSLETTER->parseSubject(array('text' => $FRM[0]['message_greeting'], 'adr' => $ADR[0], 'date' => $date_sub)));
 }
コード例 #2
0
ファイル: send_it.php プロジェクト: aydancoskun/octobercms
 //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'])) {
         $ToName = $NEWSLETTER->parseRcptName(array('text' => $NL[0]['rcpt_name'], 'date' => date(TM_NL_DATEFORMAT)));
         //hmmm, we should use date from send_at in q!
     } else {
         if (!empty($C[0]['rcpt_name'])) {
             $ToName = $NEWSLETTER->parseRcptName(array('text' => $C[0]['rcpt_name'], 'date' => date(TM_NL_DATEFORMAT)));
             //hmmm, we should use date from send_at in q!
         } else {