Index: branches/RC/core/units/email_events/email_events_event_handler.php =================================================================== diff -u -r9121 -r9369 --- branches/RC/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 9121) +++ branches/RC/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 9369) @@ -383,7 +383,10 @@ { $deliver_count = $event->getEventParam('deliver_count'); if ($deliver_count === false) { - $deliver_count = 10; // 10 emails per script run (if not specified directly) + $deliver_count = $this->Application->ConfigValue('Smtp_ProcessEmailsPerStep'); + if ($deliver_count === false) { + $deliver_count = 10; // 10 emails per script run (if not specified directly) + } } $processing_type = $this->Application->GetVar('type'); @@ -444,6 +447,11 @@ $i++; } + $wait_time = $this->Application->ConfigValue('Smtp_StepWaitTime'); + if ($wait_time !== false) { + sleep((int)$wait_time); + } + if ($processing_type = 'return_progress') { $emails_sent += $message_count; if ($emails_sent >= $total_emails) { Index: branches/RC/core/units/email_messages/email_messages_event_handler.php =================================================================== diff -u -r9366 -r9369 --- branches/RC/core/units/email_messages/email_messages_event_handler.php (.../email_messages_event_handler.php) (revision 9366) +++ branches/RC/core/units/email_messages/email_messages_event_handler.php (.../email_messages_event_handler.php) (revision 9369) @@ -228,7 +228,11 @@ */ function OnPrepareEmailQueue(&$event) { - $prepare_count = 10; // 10 recipients per script run + $prepare_count = $this->Application->ConfigValue('Smtp_ProcessEmailsPerStep'); + if ($prepare_count === false) { + // 10 recipients per script run (if none defined in config) + $prepare_count = 10; + } $email_prepare_progress = $this->Application->RecallVar('email_prepare_progress'); if ($email_prepare_progress === false) {