{"record":{"id":"db4db1a6d9e9535f","repo":"phacility/phabricator","slug":"use-the-s-flag-to-specify-one-or-more-messages","errorCode":null,"errorMessage":"Use the '%s' flag to specify one or more messages to resend.","messagePattern":"Use the '(.+?)' flag to specify one or more messages to resend\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"info","filePath":"src/applications/metamta/management/PhabricatorMailManagementResendWorkflow.php","lineNumber":28,"sourceCode":"      ->setExamples(\n        '**resend** --id 1 --id 2')\n      ->setArguments(\n        array(\n          array(\n            'name'    => 'id',\n            'param'   => 'id',\n            'help'    => pht('Send mail with a given ID again.'),\n            'repeat'  => true,\n          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $console = PhutilConsole::getConsole();\n\n    $ids = $args->getArg('id');\n    if (!$ids) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          \"Use the '%s' flag to specify one or more messages to resend.\",\n          '--id'));\n    }\n\n    $messages = id(new PhabricatorMetaMTAMail())->loadAllWhere(\n      'id IN (%Ld)',\n      $ids);\n\n    if ($ids) {\n      $ids = array_fuse($ids);\n      $missing = array_diff_key($ids, $messages);\n      if ($missing) {\n        throw new PhutilArgumentUsageException(\n          pht(\n            'Some specified messages do not exist: %s',\n            implode(', ', array_keys($missing))));\n      }","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/metamta/management/PhabricatorMailManagementResendWorkflow.php#L10-L46","documentation":"'bin/mail resend' re-queues previously sent messages identified by one or more --id flags. The workflow checked $args->getArg('id') first, found none, and halted with this PhutilArgumentUsageException before loading anything.","triggerScenarios":"Running ./bin/mail resend without --id; misspelling the flag; scripts that assemble the command and pass the IDs some other way.","commonSituations":"Retrying a failed or stuck send after fixing the mailer; first use of the workflow.","solutions":["Add one or more --id flags with mail IDs: ./bin/mail resend --id 12 --id 34.","Get the IDs from the Outbound Mail web UI (MetaMTA application) or your mail logs.","Afterwards, watch delivery in the mail UI / daemon log to confirm the resend worked."],"exampleFix":"# before\n./bin/mail resend\n\n# after\n./bin/mail resend --id 12 --id 34","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Collect mail IDs from the Outbound Mail UI before scripting resends.","resend requires at least one --id flag; add it in scripts that wrap the workflow."],"tags":["phabricator","cli","mail","usage-error"],"backgroundTag":"missing-cli-argument","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}