phacility/phabricator · warning · PhutilArgumentUsageException
Mailer key (" ") is not configured, or does not support…
Error message
Mailer key ("%s") is not configured, or does not support outbound messages of type "%s". Available mailers are: %s. What it means
`--mailer` names a key that is not in the outbound-plus-media-filtered mailer map. Either no mailer with that key is configured at all, or a mailer with that key exists but is inbound-only or does not support the selected message type. The exception lists the keys that did pass the filter, so it distinguishes 'typo' from 'wrong capabilities' for you.
Solutions
- Copy the key verbatim from the exception's 'Available mailers are:' list.
- If the key is correct, open cluster.mailers and check that entry's `"outbound"` and media configuration against your --type.
- Drop --mailer to let Phabricator choose any eligible mailer.
Example fix
// before
$ bin/mail send-test --to alincoln --mailer ses1
// Exception: Mailer key ("ses1") is not configured... Available mailers are: ses-1.
// after
$ bin/mail send-test --to alincoln --mailer ses-1 Defensive patterns
Strategy: validation
Validate before calling
// Verify the key passes the same outbound+media filter before using it:
$mailers = mpull(
PhabricatorMetaMTAMail::newMailers(array('media' => array($type), 'outbound' => true)),
null,
'getKey');
if (!isset($mailers[$mailer_key])) {
fwrite(STDERR, sprintf("Mailer '%s' unavailable. Available: %s\n", $mailer_key, implode(', ', array_keys($mailers))));
exit(1);
} Prevention
- Copy mailer keys from `bin/config get cluster.mailers`, not from memory.
- Name mailers deterministically (e.g. ses-1, twilio-1) and keep names stable across environments.
- Smoke-test a specific mailer right after adding or renaming it.
When it happens
Trigger: Typo in the key (`--mailer ses1` vs configured `ses-1`); referencing a mailer configured with `"outbound": false`; combining `--type sms` with `--mailer` pointing at an email-only adapter (SMTP/SES); a key copied from a different environment.
Common situations: Multiple mailers configured and keys misremembered; mailer entries renamed during config cleanup; per-environment cluster.mailers divergence.
Related errors
- No configured mailers support outbound messages of type
- Application email (" ") has an invalid default author (" ").
- Argument " " is not a valid message ID.
- Message type " " is unknown, supported message types are: .
- No such user ' ' exists.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/625f671c8bbbf7e4.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php:205
$mailers = PhabricatorMetaMTAMail::newMailers(
array(
'media' => array($type),
'outbound' => true,
));
$mailers = mpull($mailers, null, 'getKey');
if (!$mailers) {
throw new PhutilArgumentUsageException(
pht(
'No configured mailers support outbound messages of type "%s".',
$type));
}
$mailer_key = $args->getArg('mailer');
if ($mailer_key !== null) {
if (!isset($mailers[$mailer_key])) {
throw new PhutilArgumentUsageException(
pht(
'Mailer key ("%s") is not configured, or does not support '.
'outbound messages of type "%s". Available mailers are: %s.',
$mailer_key,
$type,
implode(', ', array_keys($mailers))));
}
$mail->setTryMailers(array($mailer_key));
}
foreach ($attach as $attachment) {
$data = Filesystem::readFile($attachment);
$name = basename($attachment);
$mime = Filesystem::getMimeType($attachment);
$file = new PhabricatorMailAttachment($data, $name, $mime);
$mail->addAttachment($file);
}View on GitHub (pinned to 5720a38cfe)