{"record":{"id":"d792180617bd426e","repo":"phacility/phabricator","slug":"the-command-s-is-not-a-supported-mail-command","errorCode":null,"errorMessage":"The command \"!%s\" is not a supported mail command. Valid commands for this object are: %s.","messagePattern":"The command \"!(.+?)\" is not a supported mail command\\. Valid commands for this object are: (.+?)\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"warning","filePath":"src/applications/transactions/replyhandler/PhabricatorApplicationTransactionReplyHandler.php","lineNumber":159,"sourceCode":"      } else {\n        $valid_commands = array();\n        foreach ($list as $valid_command) {\n          $aliases = $valid_command->getCommandAliases();\n          if ($aliases) {\n            foreach ($aliases as $key => $alias) {\n              $aliases[$key] = '!'.$alias;\n            }\n            $aliases = implode(', ', $aliases);\n            $valid_commands[] = pht(\n              '!%s (or %s)',\n              $valid_command->getCommand(),\n              $aliases);\n          } else {\n            $valid_commands[] = '!'.$valid_command->getCommand();\n          }\n        }\n\n        throw new Exception(\n          pht(\n            'The command \"!%s\" is not a supported mail command. Valid '.\n            'commands for this object are: %s.',\n            $command,\n            implode(', ', $valid_commands)));\n      }\n    }\n\n    return $xactions;\n  }\n\n}\n","sourceCodeStart":141,"sourceCodeEnd":172,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/transactions/replyhandler/PhabricatorApplicationTransactionReplyHandler.php#L141-L172","documentation":"Email reply handlers parse '!command' lines at the top of mail replies and validate each against the commands the target object actually supports. An unrecognized command raises this exception, listing the valid commands (and their aliases) for that object type.","triggerScenarios":"Replying to a Maniphest task email with a command the Maniphest reply handler does not define (e.g. '!resolve' when only '!close', '!claim', etc. exist), or using a Differential command like '!request' on an object whose handler implements a different set.","commonSituations":"Users guessing command names across applications ('!approve' on tasks, '!claim' on revisions where unsupported); command renamed between Phabricator versions; custom reply handlers with a narrower command list than users expect.","solutions":["Read the error text: it enumerates the valid '!commands' for that object type; resend the reply using one of them.","Remove the offending '!command' line and perform the action from the web UI.","Check the object's Mail Commands section in the application docs (or the handler class) for the supported list and aliases.","If the workflow genuinely needs the command, implement a custom MetaMTAEmailTransactionCommand and register it with the handler."],"exampleFix":"// before (email reply body)\n!resolve now\n\n// after (email reply body)\n!close","handlingStrategy":"try-catch","validationCode":"// Before processing a reply, check the command against what the object supports\n$valid = array();\nforeach ($object->getApplicationObjectEmailCommandObjects() as $command) {\n  $valid[strtolower($command->getCommand())] = true;\n}\nif ($command !== null && empty($valid[strtolower($command)])) {\n  // bounce a friendly reply listing valid commands instead of crashing the receiver\n}","typeGuard":null,"tryCatchPattern":"try {\n  $xactions = $handler->processEmailCommand($command, $body);\n} catch (Exception $ex) {\n  if (strpos($ex->getMessage(), 'not a supported mail command') !== false) {\n    // send the user an error email containing the valid command list\n  }\n}","preventionTips":["Publish the supported mail commands per object type where users can find them.","In custom reply handlers, keep getMailCommandObjects() aligned with user documentation.","Treat unknown commands as recoverable: reply with help text instead of failing ingestion."],"tags":["phabricator","email","reply-handler","mail-commands","user-input"],"backgroundTag":"unsupported-command","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}