output(sprintf($GLOBALS['I18N']->get('%s is currently over throttle limit of %d per %d seconds') . ' (' . $domainthrottle[$domainname]['sent'] . ')', $domainname, DOMAIN_BATCH_SIZE, DOMAIN_BATCH_PERIOD));
             }
         }
     }
 }
 if ($cansend) {
     $success = 0;
     if (!TEST) {
         if (!$throttled) {
             if (VERBOSE) {
                 output($GLOBALS['I18N']->get('Sending') . ' ' . $messageid . ' ' . $GLOBALS['I18N']->get('to') . ' ' . $useremail);
             }
             $timer = new timer();
             $success = sendEmail($messageid, $useremail, $userhash, $htmlpref, $rssitems);
             if (VERBOSE) {
                 output($GLOBALS['I18N']->get('It took') . ' ' . $timer->elapsed(1) . ' ' . $GLOBALS['I18N']->get('seconds to send'));
             }
         } else {
             $throttlecount++;
         }
     } else {
         $success = sendEmailTest($messageid, $useremail);
     }
     if ($success) {
         if (USE_DOMAIN_THROTTLE) {
             list($mailbox, $domainname) = explode('@', $useremail);
             if ($domainthrottle[$domainname]['interval'] != $interval) {
                 $domainthrottle[$domainname]['interval'] = $interval;
                 $domainthrottle[$domainname]['sent'] = 0;
             } else {
                 $domainthrottle[$domainname]['sent']++;
Esempio n. 2
0
         ++$counters['batch_count'];
         $success = sendEmail($messageid, $useremail, $userhash, $htmlpref);
         // $rssitems Obsolete by rssmanager plugin
         if (!$success) {
             ++$counters['sendemail returned false total'];
             ++$counters['sendemail returned false'];
         } else {
             $counters['sendemail returned false'] = 0;
         }
         if ($counters['sendemail returned false'] > 10) {
             foreach ($GLOBALS['plugins'] as $pluginname => $plugin) {
                 $plugin->processError(s('Warning: a lot of errors while sending campaign %d', $messageid));
             }
         }
         if (VERBOSE) {
             processQueueOutput($GLOBALS['I18N']->get('It took') . ' ' . $emailSentTimer->elapsed(1) . ' ' . $GLOBALS['I18N']->get('seconds to send'));
         }
     } else {
         ++$throttlecount;
     }
 } else {
     $success = sendEmailTest($messageid, $useremail);
     ++$counters['sentastest'];
     ++$counters['batch_count'];
     setMessageData($messageid, 'sentastest', $counters['sentastest']);
 }
 #############################
 # tried to send email , process succes / failure
 if ($success) {
     if (USE_DOMAIN_THROTTLE) {
         list($mailbox, $domainname) = explode('@', $useremail);