Differential D21786 Diff 51924 src/applications/meta/controller/PhabricatorApplicationEmailCommandsController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/meta/controller/PhabricatorApplicationEmailCommandsController.php
Show All 29 Lines | $commands = MetaMTAEmailTransactionCommand::getAllCommandsForObject( | ||||
$spec['object']); | $spec['object']); | ||||
$commands = msort($commands, 'getCommand'); | $commands = msort($commands, 'getCommand'); | ||||
$content = array(); | $content = array(); | ||||
$content[] = '= '.pht('Mail Commands Overview'); | $content[] = '= '.pht('Mail Commands Overview'); | ||||
$content[] = pht( | $content[] = pht( | ||||
'After configuring Phabricator to process inbound mail, you can '. | 'After configuring processing for inbound mail, you can '. | ||||
'interact with objects (like tasks and revisions) over email. For '. | 'interact with objects (like tasks and revisions) over email. For '. | ||||
'information on configuring Phabricator, see '. | 'information on configuring inbound mail, see '. | ||||
'**[[ %s | Configuring Inbound Email ]]**.'. | '**[[ %s | Configuring Inbound Email ]]**.'. | ||||
"\n\n". | "\n\n". | ||||
'In most cases, you can reply to email you receive from Phabricator '. | 'In most cases, you can reply to email you receive from this server '. | ||||
'to leave comments. You can also use **mail commands** to take a '. | 'to leave comments. You can also use **mail commands** to take a '. | ||||
'greater range of actions (like claiming a task or requesting changes '. | 'greater range of actions (like claiming a task or requesting changes '. | ||||
'to a revision) without needing to log in to the web UI.'. | 'to a revision) without needing to log in to the web UI.'. | ||||
"\n\n". | "\n\n". | ||||
'Mail commands are keywords which start with an exclamation point, '. | 'Mail commands are keywords which start with an exclamation point, '. | ||||
'like `!claim`. Some commands may take parameters, like '. | 'like `!claim`. Some commands may take parameters, like '. | ||||
"`!assign alincoln`.\n\n". | "`!assign alincoln`.\n\n". | ||||
'To use mail commands, write one command per line at the beginning '. | 'To use mail commands, write one command per line at the beginning '. | ||||
'or end of your mail message. For example, you could write this in a '. | 'or end of your mail message. For example, you could write this in a '. | ||||
'reply to task email to claim the task:'. | 'reply to task email to claim the task:'. | ||||
"\n\n```\n!claim\n\nI'll take care of this.\n```\n\n\n". | "\n\n```\n!claim\n\nI'll take care of this.\n```\n\n\n". | ||||
"When Phabricator receives your mail, it will process any commands ". | "When %s receives your mail, it will process any commands ". | ||||
"first, then post the remaining message body as a comment. You can ". | "first, then post the remaining message body as a comment. You can ". | ||||
"execute multiple commands at once:". | "execute multiple commands at once:". | ||||
"\n\n```\n!assign alincoln\n!close\n\nI just talked to @alincoln, ". | "\n\n```\n!assign alincoln\n!close\n\nI just talked to @alincoln, ". | ||||
"and he showed me that he fixed this.\n```\n", | "and he showed me that he fixed this.\n```\n", | ||||
PhabricatorEnv::getDoclink('Configuring Inbound Email')); | PhabricatorEnv::getDoclink('Configuring Inbound Email'), | ||||
PlatformSymbols::getPlatformServerName()); | |||||
$content[] = '= '.$spec['header']; | $content[] = '= '.$spec['header']; | ||||
$content[] = $spec['summary']; | $content[] = $spec['summary']; | ||||
$content[] = '= '.pht('Quick Reference'); | $content[] = '= '.pht('Quick Reference'); | ||||
$content[] = pht( | $content[] = pht( | ||||
'This table summarizes the available mail commands. For details on a '. | 'This table summarizes the available mail commands. For details on a '. | ||||
'specific command, see the command section below.'); | 'specific command, see the command section below.'); | ||||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | public function handleRequest(AphrontRequest $request) { | ||||
$crumbs->addTextCrumb($title); | $crumbs->addTextCrumb($title); | ||||
$crumbs->setBorder(true); | $crumbs->setBorder(true); | ||||
$content_box = new PHUIRemarkupView($viewer, $content); | $content_box = new PHUIRemarkupView($viewer, $content); | ||||
$info_view = null; | $info_view = null; | ||||
if (!PhabricatorEnv::getEnvConfig('metamta.reply-handler-domain')) { | if (!PhabricatorEnv::getEnvConfig('metamta.reply-handler-domain')) { | ||||
$error = pht( | $error = pht( | ||||
"Phabricator is not currently configured to accept inbound mail. ". | "This server is not currently configured to accept inbound mail. ". | ||||
"You won't be able to interact with objects over email until ". | "You won't be able to interact with objects over email until ". | ||||
"inbound mail is set up."); | "inbound mail is set up."); | ||||
$info_view = id(new PHUIInfoView()) | $info_view = id(new PHUIInfoView()) | ||||
->setErrors(array($error)); | ->setErrors(array($error)); | ||||
} | } | ||||
$header = id(new PHUIHeaderView()) | $header = id(new PHUIHeaderView()) | ||||
->setHeader($title); | ->setHeader($title); | ||||
Show All 15 Lines |