phacility/phabricator · info · PhutilArgumentUsageException
Use the '%s' flag to specify one or more messages to resend.
Error message
Use the '%s' flag to specify one or more messages to resend.
What it means
'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.
Source
Thrown at src/applications/metamta/management/PhabricatorMailManagementResendWorkflow.php:28
->setExamples(
'**resend** --id 1 --id 2')
->setArguments(
array(
array(
'name' => 'id',
'param' => 'id',
'help' => pht('Send mail with a given ID again.'),
'repeat' => true,
),
));
}
public function execute(PhutilArgumentParser $args) {
$console = PhutilConsole::getConsole();
$ids = $args->getArg('id');
if (!$ids) {
throw new PhutilArgumentUsageException(
pht(
"Use the '%s' flag to specify one or more messages to resend.",
'--id'));
}
$messages = id(new PhabricatorMetaMTAMail())->loadAllWhere(
'id IN (%Ld)',
$ids);
if ($ids) {
$ids = array_fuse($ids);
$missing = array_diff_key($ids, $messages);
if ($missing) {
throw new PhutilArgumentUsageException(
pht(
'Some specified messages do not exist: %s',
implode(', ', array_keys($missing))));
}View on GitHub (pinned to 5720a38cfe)
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.
Example fix
# before ./bin/mail resend # after ./bin/mail resend --id 12 --id 34
Defensive patterns
Strategy: validation
Prevention
- 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.
When it happens
Trigger: Running ./bin/mail resend without --id; misspelling the flag; scripts that assemble the command and pass the IDs some other way.
Common situations: Retrying a failed or stuck send after fixing the mailer; first use of the workflow.
Related errors
- Use '%s' to specify the receiving object or email address.
- Use '--as' to specify the acting user.
- Specify a device with --device.
- Specify a private key with --private-key.
- Specify a public key to trust with --id.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/db4db1a6d9e9535f.
Report an issue: GitHub.