diff --git a/Mail/Queue.php b/Mail/Queue.php index 7f39c64..5d1513f 100644 --- a/Mail/Queue.php +++ b/Mail/Queue.php @@ -376,7 +376,7 @@ function sendMailsInQueue($limit = MAILQUEUE_ALL, $offset = MAILQUEUE_START, } $this->container->setOption($limit, $offset, $try); - while ($mail = $this->get()) { + while ($mail = $this->get() && !Pear::isError($mail)) { $this->container->countSend($mail); $result = $this->sendMail($mail, true);