diff -u3rb oemp/public/cron_per_tasks.php oempv3210.drhpatched-0.02/public/cron_per_tasks.php --- oemp/public/cron_per_tasks.php Mon Mar 24 10:33:00 2003 +++ oempv3210.drhpatched-0.02/public/cron_per_tasks.php Fri Nov 21 16:19:24 2003 @@ -9,6 +9,8 @@ ====================================== */ +$print_status_to_output = 1; + //--------------------------------------------------------------[ First Part - STARTED //--------------------------------------------------------------[ Get system path @@ -120,6 +122,7 @@ print("Process completed. ".number_format($TotalSentScheduledEmails)." scheduled emails are processed"); print("
"); print("This is a CRON/Scheduled Task module"); +print("\n"); // Give a message to the screen - FINISHED // Make last processes diff -u3rb oemp/system/classes/class_mailer.php oempv3210.drhpatched-0.02/system/classes/class_mailer.php --- oemp/system/classes/class_mailer.php Fri Aug 8 15:39:00 2003 +++ oempv3210.drhpatched-0.02/system/classes/class_mailer.php Fri Mar 12 12:27:21 2004 @@ -409,6 +409,9 @@ $header = ""; $body = ""; +# ==================== HACK HACK HACK HACK HACK HACK HACK HACK HACK ==================== +# $this->IsQmail(); + if((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { $this->SetError($this->Lang("provide_address")); @@ -456,8 +459,8 @@ * @return bool */ function SendmailSend($header, $body) { - if ($this->Sender != "") - $sendmail = sprintf("%s -oi -f %s -t", $this->Sendmail, $this->Sender); + if ($this->ReturnPath != "") + $sendmail = sprintf("%s -oi -f %s -t", $this->Sendmail, $this->ReturnPath); else $sendmail = sprintf("%s -oi -t", $this->Sendmail); @@ -493,11 +496,11 @@ $to .= $this->to[$i][0]; } - if ($this->Sender != "" && strlen(ini_get("safe_mode"))< 1) + if ($this->ReturnPath != "" && strlen(ini_get("safe_mode"))< 1) { $old_from = ini_get("sendmail_from"); - ini_set("sendmail_from", $this->Sender); - $params = sprintf("-oi -f %s", $this->Sender); + ini_set("sendmail_from", $this->ReturnPath); + $params = sprintf("-oi -f %s", $this->ReturnPath); $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header, $params); } @@ -541,7 +544,7 @@ } // !!!!!!!!!!!!!!! MODIFIED BY OCTETH TECHNOLOGIES !!!!!!!!!!!!!!!!!!!!!!! - FINISHED - $smtp_from = ($this->Sender == "") ? $this->From : $this->Sender; + $smtp_from = ($this->ReturnPath == "") ? $this->From : $this->ReturnPath; if(!$this->smtp->Mail($smtp_from)) { $error = $this->Lang("from_failed") . $smtp_from; @@ -874,14 +877,14 @@ $result .= $this->Received(); $result .= $this->HeaderLine("Date", $this->RFCDate()); - if($this->Sender == "") - $result .= $this->HeaderLine("Return-Path", trim($this->From)); - else - $result .= $this->HeaderLine("Return-Path", trim($this->Sender)); +# if($this->ReturnPath == "") +# $result .= $this->HeaderLine("Return-Path", trim($this->From)); +# else +# $result .= $this->HeaderLine("Return-Path", trim($this->ReturnPath)); // !!!!!!!!!!!!!!! MODIFIED BY OCTETH TECHNOLOGIES !!!!!!!!!!!!!!!!!!!!!!! - STARTED - if($this->Sender == "") - $result .= $this->HeaderLine("Errors-To", trim($this->ReturnPath)); + if($this->ReturnPath == "") + $result .= $this->HeaderLine("Errors-To", trim($this->From)); else $result .= $this->HeaderLine("Errors-To", trim($this->ReturnPath)); // !!!!!!!!!!!!!!! MODIFIED BY OCTETH TECHNOLOGIES !!!!!!!!!!!!!!!!!!!!!!! - FINISHED diff -u3rb oemp/system/classes/class_octethsendengine.php oempv3210.drhpatched-0.02/system/classes/class_octethsendengine.php --- oemp/system/classes/class_octethsendengine.php Thu Aug 14 10:17:00 2003 +++ oempv3210.drhpatched-0.02/system/classes/class_octethsendengine.php Tue Nov 25 14:04:48 2003 @@ -304,7 +304,7 @@ var $_ArchiveRecipients = ""; var $_ArchiveAttachedFiles = ""; var $_ObjectMailer = object; -var $_AmountOfRowsToProcess = 30; +var $_AmountOfRowsToProcess = 1200; var $_TotalPeriods = 0; var $_LoopStart = 0; var $_TotalSentEmails = 0; @@ -1272,6 +1272,9 @@ $this->_ObjectMailer->XMailer = $this->_ArrayConfig["mailer"]; $this->_ObjectMailer->ReturnPath = $this->_ReturnPathEmail; + # drh fix + $this->_ObjectMailer->Sender = $this->_ReturnPathEmail; + $this->_ObjectMailer->AddReplyTo($this->_ReplyToEmail, $this->_ReplyToName); return true; @@ -1328,7 +1331,7 @@ // Void OUT N/A N/A function InitializeEmailSendingVars() { - $this->_AmountOfRowsToProcess = 30; + $this->_AmountOfRowsToProcess = 1200; $this->_TotalPeriods = ceil($this->_TotalRecipients / $this->_AmountOfRowsToProcess); $this->_LoopStart = 0; $this->_TotalSentEmails = 0; @@ -1724,6 +1727,8 @@ // Void OUT N/A N/A function SendEmails() { + global $print_status_to_output; + // Intialize method veriables - STARTED $ErrorExists = false; $CurrentSMTPCounter = 0; @@ -2111,9 +2116,16 @@ if ($this->_ObjectMailer->Send() == false) { // Sending failed + + if ($print_status_to_output) + { + echo $EachSubscriber['email'], ", failure\n"; + } + $this->_TotalFailedRecipients++; // If enabled, record to error log with the error message and enough information - STARTED + if ($this->KeepErrorLog == true) { $LogRow = $this->_InstantStatID." - ".$this->_ArchiveID." - ".$EachSubscriber['subscriber_id']." - ".$EachSubscriber['email']." - ".$this->_ObjectMailer->ErrorInfo."\n"; @@ -2124,6 +2136,11 @@ else { // Sent successful + + if ($print_status_to_output) + { + echo $EachSubscriber['email'], ", success\n"; + } } // Send the email to the recipient. If can not send, report it - FINISHED }