#!/usr/bin/env php loadAllWhere( 'status = %s', PhabricatorMetaMTAMail::STATUS_QUEUE); foreach ($messages as $message) { if (!$message->getWorkerTaskID()) { $mailer_task = PhabricatorWorker::scheduleTask( 'PhabricatorMetaMTAWorker', $message->getID()); $message->setWorkerTaskID($mailer_task->getID()); $message->save(); $id = $message->getID(); echo "#$id\n"; } }