phacility/phabricator · warning · PhutilArgumentUsageException
Use the '%s' flag to specify one or more messages to show.
Error message
Use the '%s' flag to specify one or more messages to show.
What it means
`bin/mail show-outbound` requires at least one message ID via the repeatable `--id` flag; the workflow throws PhutilArgumentUsageException before any database access when the list is empty. Outbound IDs are the numeric IDs of PhabricatorMetaMTAMail rows (sent mail).
Source
Thrown at src/applications/metamta/management/PhabricatorMailManagementShowOutboundWorkflow.php:34
'param' => 'id',
'help' => pht('Show details about outbound mail with given ID.'),
'repeat' => true,
),
array(
'name' => 'dump-html',
'help' => pht(
'Dump the HTML body of the mail. You can redirect it to a '.
'file and then open it in a browser.'),
),
));
}
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 show.",
'--id'));
}
foreach ($ids as $id) {
if (!ctype_digit($id)) {
throw new PhutilArgumentUsageException(
pht(
'Argument "%s" is not a valid message ID.',
$id));
}
}
$messages = id(new PhabricatorMetaMTAMail())->loadAllWhere(
'id IN (%Ld)',
$ids);
View on GitHub (pinned to 5720a38cfe)
Solutions
- Pass one or more IDs: `bin/mail show-outbound --id 456`.
- Get IDs from the web UI's sent-mail (MetaMTAMail) list or from daemon transaction logs.
- Assert non-empty ID lists in automation before invoking the workflow.
Example fix
// before $ bin/mail show-outbound // Exception: Use the '--id' flag to specify one or more messages to show. // after $ bin/mail show-outbound --id 456 --dump-html
Defensive patterns
Strategy: validation
Validate before calling
if (empty($ids)) {
fwrite(STDERR, "show-outbound requires one or more --id values.\n");
exit(1);
} Prevention
- Source outbound IDs from the sent-mail list in the web UI.
- Assert non-empty ID lists in automation.
- Use --dump-html to inspect rendered bodies once you have a valid ID.
When it happens
Trigger: Running show-outbound with no arguments; empty ID list from a script; passing flags like --subject that this workflow does not accept.
Common situations: Exploratory runs; scripts built around a queue that turned out empty.
Related errors
- Message type "%s" is unknown, supported message types are: %
- Specify one or more users to send a message to with "--to" a
- Use the '%s' flag to specify one or more messages to show.
- Argument "%s" is not a valid message ID.
- No such user '%s' exists.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/00170cdac7a32926.
Report an issue: GitHub.