Adding sending of batches and bounce processing.

This commit is contained in:
Martin Kamerbeek 2010-05-19 15:42:39 +02:00
parent d62f56a635
commit f8cb8cd05a
5 changed files with 134 additions and 10 deletions

View file

@ -49,12 +49,19 @@ sub execute {
# For now only process test mails.
my $it = WebGUI::Mailing::Email->getQueuedTestEmails( $session );
while ( my $email = $it->() ) {
return $self->WAITING(1) if time >= $maxTime;
$email->send;
}
my $it = WebGUI::Mailing::Email->getSendableEmails( $session );
while ( my $email = $it->() ) {
$session->log->warn( "processing" . $email->getId );
return $self->WAITING(1) if time >= $maxTime;
$email->send;
}
return $self->COMPLETE;
}